home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d7 / commo50.arc / MACRO.DOC < prev    next >
Text File  |  1991-09-05  |  113KB  |  3,268 lines

  1.  
  2.  
  3.  
  4.                                    ____________
  5.  
  6.                                    {COMMO} (tm)
  7.                                    ____________
  8.  
  9.  
  10.                       "A New Standard in Telecommunications"
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.                                         by
  18.  
  19.                                   Fred P. Brucker
  20.  
  21.                                Post Office Box 9103
  22.                                Santa Rosa, CA 95405
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.                               Macro Programming Guide
  30.  
  31.  
  32.  
  33.  
  34.                                     Release 5.0
  35.  
  36.                                   August 28, 1991
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.        This program and associated documentation are the property of the
  44.        author and may not be sold without permission.  They may be freely
  45.        distributed, unaltered and as a unit, via electronic bulletin board
  46.        systems.  Permission to distribute on diskette or in any other
  47.        manner must be obtained in writing.  See the file LICENSES for
  48.        additional licensing and distribution details.
  49.  
  50.        The author does not guarantee this program to be free from defects
  51.        and may not be held responsible for loss caused by such.  Your use
  52.        of this program constitutes your acceptance of these terms.
  53.  
  54.  
  55.  
  56.  
  57.            (C)Copyright 1989,1991  Fred P. Brucker  All Rights Reserved
  58.  
  59.  
  60.  
  61.                    {COMMO} (tm)  Macro Programming Guide            page ii
  62.  
  63.  
  64.        ========================
  65.        Registration Information
  66.        ========================
  67.  
  68.        {COMMO} is not a public domain program and is not free.  It is
  69.        classified as "SHAREWARE."  What this means is that you may use the
  70.        program for 30 days to determine its suitability to your
  71.        application.  If after that time you decide to continue using
  72.        {COMMO} you must pay the registration fee.
  73.  
  74.        {COMMO} is a unique program and represents many thousands of hours
  75.        of work.  A lot of functionality has been compressed into a small
  76.        package, and more features are being added on a continuing basis. 
  77.        If you find {COMMO} useful and enjoyable, you can help support
  78.        future improvements by registering your copy.
  79.  
  80.  
  81.        A single-user license is $35.00.  A {COMMO} diskette will be
  82.        provided for a $5.00 handling fee (specify current or next release,
  83.        5.25" or 3.5") .  Send cash, check or money order (US funds) to the
  84.        address below.
  85.  
  86.        Details and a multi-user (site) license fee schedule are provided in
  87.        the file REGISTER.FRM.
  88.  
  89.        See also the enclosed file LICENSES for complete licensing,
  90.        distribution and copyright information.
  91.  
  92.        My (voice) telephone number for inquiries and support for registered
  93.        users is (707) 573-1065.  Please restrict calls to business hours
  94.        (Pacific time).
  95.  
  96.         
  97.        Thank you, and I hope you enjoy {COMMO}.
  98.  
  99.  
  100.                                              Fred P. Brucker
  101.                                              P.O. Box 9103
  102.                                              Santa Rosa, CA 95405
  103.  
  104.  
  105.  
  106.                    {COMMO} (tm)  Macro Programming Guide           page iii
  107.  
  108.  
  109.        ========
  110.        Contents
  111.        ========
  112.  
  113.  
  114.           Programming {COMMO} Macros  . . . . . . . . . . . . . . . . .   1
  115.                Macro Structure  . . . . . . . . . . . . . . . . . . . .   1
  116.                Macro Functions  . . . . . . . . . . . . . . . . . . . .   1
  117.                Macro Labels . . . . . . . . . . . . . . . . . . . . . .   3
  118.                Macro Variables  . . . . . . . . . . . . . . . . . . . .   4
  119.                How to Use Variables . . . . . . . . . . . . . . . . . .   5
  120.                Reserved Variables . . . . . . . . . . . . . . . . . . .   6
  121.                Executing Macros . . . . . . . . . . . . . . . . . . . .   7
  122.                Additional Macro Execution Rules . . . . . . . . . . . .   8
  123.                Cancelling a Macro . . . . . . . . . . . . . . . . . . .   8
  124.  
  125.           Description of Functions (Alphabetical) . . . . . . . . . . .   9
  126.                ABAUd  . . . . . . . . . . . . . . . . . . . . . . . . .   9
  127.                ALARm  . . . . . . . . . . . . . . . . . . . . . . . . .   9
  128.                ASCIiup  . . . . . . . . . . . . . . . . . . . . . . . .  10
  129.                AUTO . . . . . . . . . . . . . . . . . . . . . . . . . .  11
  130.                BEEP . . . . . . . . . . . . . . . . . . . . . . . . . .  11
  131.                BREAk  . . . . . . . . . . . . . . . . . . . . . . . . .  11
  132.                CALL . . . . . . . . . . . . . . . . . . . . . . . . . .  12
  133.                CAPMode  . . . . . . . . . . . . . . . . . . . . . . . .  12
  134.                CAPTure  . . . . . . . . . . . . . . . . . . . . . . . .  12
  135.                CHATmode . . . . . . . . . . . . . . . . . . . . . . . .  13
  136.                CLEAr  . . . . . . . . . . . . . . . . . . . . . . . . .  13
  137.                COMPare  . . . . . . . . . . . . . . . . . . . . . . . .  13
  138.                CURSor . . . . . . . . . . . . . . . . . . . . . . . . .  14
  139.                DECRement  . . . . . . . . . . . . . . . . . . . . . . .  14
  140.                DIAL . . . . . . . . . . . . . . . . . . . . . . . . . .  15
  141.                DISPlay  . . . . . . . . . . . . . . . . . . . . . . . .  16
  142.                DOORway  . . . . . . . . . . . . . . . . . . . . . . . .  17
  143.                DPARms . . . . . . . . . . . . . . . . . . . . . . . . .  17
  144.                EDIT . . . . . . . . . . . . . . . . . . . . . . . . . .  18
  145.                ELAPse . . . . . . . . . . . . . . . . . . . . . . . . .  18
  146.                EXECute  . . . . . . . . . . . . . . . . . . . . . . . .  19
  147.                     Using the Direct Switch: exec-D . . . . . . . . . .  20
  148.                     EXECute Preview Mode  . . . . . . . . . . . . . . .  21
  149.                EXIT . . . . . . . . . . . . . . . . . . . . . . . . . .  21
  150.                GETString  . . . . . . . . . . . . . . . . . . . . . . .  22
  151.                GOLOok . . . . . . . . . . . . . . . . . . . . . . . . .  23
  152.                GOTO . . . . . . . . . . . . . . . . . . . . . . . . . .  24
  153.                HANGup . . . . . . . . . . . . . . . . . . . . . . . . .  24
  154.                HELP . . . . . . . . . . . . . . . . . . . . . . . . . .  25
  155.                HFLOw  . . . . . . . . . . . . . . . . . . . . . . . . .  25
  156.                HOLD . . . . . . . . . . . . . . . . . . . . . . . . . .  25
  157.                IFCArrier  . . . . . . . . . . . . . . . . . . . . . . .  25
  158.                IFCOndition  . . . . . . . . . . . . . . . . . . . . . .  26
  159.                IFERrorlevel . . . . . . . . . . . . . . . . . . . . . .  27
  160.                IFEXist  . . . . . . . . . . . . . . . . . . . . . . . .  28
  161.  
  162.  
  163.  
  164.                    {COMMO} (tm)  Macro Programming Guide            page iv
  165.  
  166.  
  167.                INCRement  . . . . . . . . . . . . . . . . . . . . . . .  28
  168.                INITmodem  . . . . . . . . . . . . . . . . . . . . . . .  29
  169.                INPUt  . . . . . . . . . . . . . . . . . . . . . . . . .  29
  170.                INSTring . . . . . . . . . . . . . . . . . . . . . . . .  30
  171.                LENGth . . . . . . . . . . . . . . . . . . . . . . . . .  30
  172.                LIGHts . . . . . . . . . . . . . . . . . . . . . . . . .  30
  173.                LOCAlecho  . . . . . . . . . . . . . . . . . . . . . . .  31
  174.                LOOKfor  . . . . . . . . . . . . . . . . . . . . . . . .  31
  175.                MACLoad  . . . . . . . . . . . . . . . . . . . . . . . .  32
  176.                MACRo  . . . . . . . . . . . . . . . . . . . . . . . . .  33
  177.                MARK . . . . . . . . . . . . . . . . . . . . . . . . . .  34
  178.                NOOP . . . . . . . . . . . . . . . . . . . . . . . . . .  34
  179.                PARMs  . . . . . . . . . . . . . . . . . . . . . . . . .  34
  180.                PASSword . . . . . . . . . . . . . . . . . . . . . . . .  35
  181.                PAUSe  . . . . . . . . . . . . . . . . . . . . . . . . .  35
  182.                POPStack . . . . . . . . . . . . . . . . . . . . . . . .  35
  183.                PRINtlog . . . . . . . . . . . . . . . . . . . . . . . .  36
  184.                PUSHstack  . . . . . . . . . . . . . . . . . . . . . . .  36
  185.                RCLOse . . . . . . . . . . . . . . . . . . . . . . . . .  37
  186.                READ . . . . . . . . . . . . . . . . . . . . . . . . . .  37
  187.                RETUrn . . . . . . . . . . . . . . . . . . . . . . . . .  38
  188.                ROPEn  . . . . . . . . . . . . . . . . . . . . . . . . .  38
  189.                RXMOdem  . . . . . . . . . . . . . . . . . . . . . . . .  39
  190.                SCREen . . . . . . . . . . . . . . . . . . . . . . . . .  40
  191.                SCROllback . . . . . . . . . . . . . . . . . . . . . . .  40
  192.                SEND . . . . . . . . . . . . . . . . . . . . . . . . . .  40
  193.                SETEsc . . . . . . . . . . . . . . . . . . . . . . . . .  41
  194.                SETGet . . . . . . . . . . . . . . . . . . . . . . . . .  41
  195.                SETLook  . . . . . . . . . . . . . . . . . . . . . . . .  42
  196.                SETVariable  . . . . . . . . . . . . . . . . . . . . . .  44
  197.                SHELl  . . . . . . . . . . . . . . . . . . . . . . . . .  44
  198.                SFLOw  . . . . . . . . . . . . . . . . . . . . . . . . .  45
  199.                SOUNd  . . . . . . . . . . . . . . . . . . . . . . . . .  45
  200.                SPOCtrl  . . . . . . . . . . . . . . . . . . . . . . . .  45
  201.                STATusline . . . . . . . . . . . . . . . . . . . . . . .  45
  202.                STOP . . . . . . . . . . . . . . . . . . . . . . . . . .  46
  203.                SUBString  . . . . . . . . . . . . . . . . . . . . . . .  46
  204.                SXMOdem  . . . . . . . . . . . . . . . . . . . . . . . .  47
  205.                TOGGles  . . . . . . . . . . . . . . . . . . . . . . . .  48
  206.                UNMArk . . . . . . . . . . . . . . . . . . . . . . . . .  48
  207.                VTCUr  . . . . . . . . . . . . . . . . . . . . . . . . .  48
  208.                VTPAd  . . . . . . . . . . . . . . . . . . . . . . . . .  48
  209.                WCLOse . . . . . . . . . . . . . . . . . . . . . . . . .  49
  210.                WOPEn  . . . . . . . . . . . . . . . . . . . . . . . . .  49
  211.                WRITE  . . . . . . . . . . . . . . . . . . . . . . . . .  50
  212.  
  213.           Appendix A   Table of {COMMO} Key-labels  . . . . . . . . . .  50
  214.                Enhanced Keyboard Key-labels . . . . . . . . . . . . . .  51
  215.  
  216.           Appendix B   Macro Functions Listed by Class  . . . . . . . .  52
  217.  
  218.  
  219.  
  220.                    {COMMO} (tm)  Macro Programming Guide            page 1
  221.  
  222.  
  223.        ==========================
  224.        Programming {COMMO} Macros
  225.        ==========================
  226.  
  227.        IMPORTANT!  Please read the next few pages before you attempt to
  228.        write any macros!  The rules for writing {COMMO} macros are few in
  229.        number, but must be followed carefully.  Examples of more complex
  230.        macro programming are given in the sample Macro File COMMO.MAC, in
  231.        the supplied file MACROS.TXT and in the various Host and Guide
  232.        macros.
  233.  
  234.        The following sections assume familiarity with {COMMO}'s key
  235.        commands and with other features of the program.  Since many macro
  236.        functions have corresponding key commands, duplicate explanations
  237.        will not be given here.  Refer to the description of the key command
  238.        in COMMO.DOC.
  239.  
  240.        {COMMO}'s Macro File may contain any number of macros.  The only
  241.        size limitation on the file is that the Dialing Directory and Macro
  242.        File combined must total 64k bytes or less.
  243.  
  244.        Alternate Macro Files may be loaded using the MACLoad function (the
  245.        original file is replaced and may be reloaded at a later time). 
  246.        Only macros within the currently loaded Macro File are available for
  247.        use.  Macros added using the Internal Editor are available
  248.        immediately.
  249.  
  250.  
  251.        Macro Structure
  252.        ===============
  253.  
  254.        Macros consist of a series of items enclosed in curly braces.  Items
  255.        may be placed on the same line or on as many lines as desired.  The
  256.        file is entirely free-form.  Lines may be up to 255 characters in
  257.        length and all text outside the curly braces is ignored.
  258.  
  259.        There are two types of items: "functions" and "labels."
  260.  
  261.           Functions are action items that perform operations.  Some are
  262.           equivalent to {COMMO} key commands, such as DIAL, while others
  263.           are unique to the macro language.
  264.  
  265.           Labels are macro entry points and may be placed anywhere within a
  266.           macro.
  267.  
  268.  
  269.        Macro Functions
  270.        ===============
  271.  
  272.        All macro functions are described in detail later in this document. 
  273.        See also Appendix B "Macro Functions Listed by Class."
  274.  
  275.  
  276.  
  277.                    {COMMO} (tm)  Macro Programming Guide            page 2
  278.  
  279.  
  280.  
  281.        The general form of any macro function is:
  282.  
  283.           {name-switches arg1,arg2,...,argn}
  284.  
  285.                name      The function name describes the operation to be
  286.                          performed and consists of four or more characters.
  287.                          Only the first four are significant and case is
  288.                          ignored.
  289.  
  290.                switches  These are used to alter the operation of a
  291.                          function.  Each switch is a single letter and may
  292.                          have a "1" or "0" appended to indicate "yes" or
  293.                          "no" respectively.  The default (switch not
  294.                          present) may be either 1 or 0 depending on the
  295.                          function.
  296.  
  297.                          Switches must be separated from the name with a
  298.                          hyphen and have no intervening spaces.  They may
  299.                          be upper or lower case.  See individual function
  300.                          descriptions for details (note that only certain
  301.                          functions have switches).
  302.  
  303.                args      Arguments follow the function name and switches
  304.                          separated by a SINGLE SPACE.  Individual arguments
  305.                          are separated with commas and may contain no
  306.                          extraneous spaces (all spaces are significant).
  307.  
  308.        NOTE:  Curly braces may be represented within macro functions by
  309.        using ^( for { and ^) for }.
  310.  
  311.        Examples:
  312.  
  313.           {send Hi, how are you?}
  314.  
  315.                This function sends the string "Hi, how are you?" to the
  316.                modem.  SEND has only one argument -- the string to send
  317.                out.  Since the string is the last argument, it may contain
  318.                commas and spaces.  Quotes are not used to define strings.
  319.  
  320.           {ifcon-LE label1,label2}
  321.  
  322.                The IFCOndition function tests for conditions set by other
  323.                functions, such as COMPare.  Here two switches are present,
  324.                telling {COMMO} to test for less than or equal:
  325.  
  326.                     L    Test for "less than."
  327.                     E    Test for "equal."
  328.  
  329.                The two arguments are labels to GOTO depending on the
  330.                conditions.
  331.  
  332.  
  333.  
  334.                    {COMMO} (tm)  Macro Programming Guide            page 3
  335.  
  336.  
  337.                Notice that "name-switches" may be written in a number of
  338.                different ways:
  339.  
  340.                     ifco-LE  ifcondition-EL  ifcond-LE
  341.  
  342.           {asci-S0E1 pathname}
  343.  
  344.                The ASCII Upload function here will send the file indicated
  345.                by "pathname."  The switches override current settings and
  346.                tell {COMMO}:
  347.  
  348.                     S0   Do NOT strip linefeeds.
  349.                     E1   DO expand blank lines (may also be written "E").
  350.  
  351.           {sound}   {sound yes}
  352.  
  353.                The first function will TOGGLE Master Sound ON/OFF (since
  354.                there is no argument).  The second will turn the sound ON.
  355.  
  356.  
  357.        One very important function is the STOP function.  It is used to
  358.        terminate macro processing and may appear in either its long form or
  359.        short form:
  360.  
  361.           ... {stop}          long form
  362.           ... {}              short form
  363.  
  364.        Macro processing continues until a STOP function is executed.  Be
  365.        sure to use one or processing will continue into the next macro!
  366.  
  367.  
  368.        Macro Labels
  369.        ============
  370.  
  371.        Labels are identifiers consisting of one or more characters.  When a
  372.        label is defined, it must be preceded by a colon.  References to
  373.        labels, such as {goto label}, do not require the colon.
  374.  
  375.        Only the first eight characters in a label are significant.  Case is
  376.        ignored.  All characters are allowed in labels except the following:
  377.  
  378.           colon          ":"
  379.           space          " "
  380.           comma          ","
  381.           slash          "/"
  382.           curly braces   "{" or "}"
  383.  
  384.        Examples:
  385.  
  386.           {:mailrun} {call login} ...
  387.  
  388.           {:start-here} {:another.entry} {send Begin now!} ...
  389.  
  390.  
  391.  
  392.                    {COMMO} (tm)  Macro Programming Guide            page 4
  393.  
  394.  
  395.  
  396.  
  397.        A number of three character labels are reserved and are called "key-
  398.        labels."  When the corresponding key is pressed from the Terminal
  399.        Screen, {COMMO} will look for the key-label in the current Macro
  400.        File.  If the key-label is found, macro processing will begin at
  401.        that location.
  402.  
  403.        Any default key assignment may be overridden using a key-label.  For
  404.        example, pressing Alt-D normally enters the Dialing Directory.  But
  405.        suppose this line is in the Macro File:
  406.  
  407.           {:ald} {clear} {}
  408.  
  409.        Now pressing Alt-D will clear the screen.
  410.  
  411.        See the Appendix A "Table of {COMMO} Key-labels" for a complete list
  412.        of keys that may be assigned.
  413.  
  414.  
  415.        Macro Variables
  416.        ===============
  417.  
  418.        {COMMO} maintains a String Variable Space in which variables appear
  419.        in the form:
  420.  
  421.           name,string
  422.  
  423.                name      An identifier consisting of one or more characters
  424.                          of which only the first eight are significant. 
  425.                          Case is ignored.  The following are the only valid
  426.                          characters that my be used in a variable name:
  427.  
  428.                               "A" through "Z"
  429.                               "a" through "z"
  430.                               "0" through "9"
  431.                               "_" underline.
  432.  
  433.                          All other characters will terminate the name.
  434.  
  435.                string    A text string.  The string must not contain any
  436.                          control characters below ASCII 28.  It may be null
  437.                          (0 characters).
  438.  
  439.                          Strings consisting of only the digits 0-9 and
  440.                          representing a decimal number from 0 to 65535 are
  441.                          also numeric variables (there is no other
  442.                          difference between string and numeric variables).
  443.  
  444.                          The maximum length of strings is 240 characters.
  445.  
  446.  
  447.  
  448.                    {COMMO} (tm)  Macro Programming Guide            page 5
  449.  
  450.  
  451.        The String Variable Space may be viewed from within the Macro
  452.        Processor window by pressing "V".  The amount of unused string space
  453.        is shown at the bottom of the screen.
  454.  
  455.        Once a variable is defined, it remains in String Variable Space
  456.        until it is redefined or deleted (set to null).  Therefore variables
  457.        should be deleted or re-used to prevent String Variable Space from
  458.        becoming full.
  459.  
  460.  
  461.        How to Use Variables
  462.        ====================
  463.  
  464.        {COMMO} variables may be used in macro functions and also in the
  465.        telephone number field of the Dialing Directory.  See "Alt-D 
  466.        Dialing Directory" in COMMO.DOC for this latter usage.
  467.  
  468.        When a variable name appears within a function, the string assigned
  469.        to the name is substituted for the name.  If the variable is null,
  470.        then the name is replaced with 0 characters.  {COMMO} will expand
  471.        the variables in a function before processing it.
  472.  
  473.        In order to distinguish variable names, they must be preceded with a
  474.        percent sign "%" (use two percent signs if a percent sign is needed
  475.        in the data).
  476.  
  477.        The end of the variable name is indicated with another "%" or with
  478.        the first character that is not allowed in a name (see above).
  479.  
  480.  
  481.        A variable definition example:
  482.  
  483.           {setvar animal,Elephant} or {setvar %animal,Elephant}
  484.  
  485.                Notice that the "%" is not required (but is permitted) when
  486.                the variable name is the first argument of a function that
  487.                defines, modifies or tests the value of a variable.  Other
  488.                such functions include INPUt, GETString, INCRement,
  489.                DECRement, COMPare, SUBString, INSTring, READ.
  490.  
  491.                If the variable name in this situation needs to be a
  492.                variable, then use two percent signs:
  493.  
  494.           {setv %%animal,Elephant}
  495.  
  496.  
  497.        Variable usage examples:
  498.  
  499.           {setvar animal,Elephant}
  500.           {send %animal}           Sends "Elephant" to the modem.
  501.           {send animal}            Sends "animal".
  502.           {send %animal%s are large animals}
  503.  
  504.  
  505.  
  506.                    {COMMO} (tm)  Macro Programming Guide            page 6
  507.  
  508.  
  509.                                    Sends "Elephants are large animals". 
  510.                                    Note that the trailing "%" is required
  511.                                    here.
  512.  
  513.           {setvar animal,Elephant}
  514.           {setv creature,animal}
  515.           {send creature}          Sends "creature". 
  516.           {send %creature}         Sends "animal". 
  517.           {setv %%creature,Giraffe}
  518.           {send %animal}           Sends "Giraffe".
  519.  
  520.  
  521.        IMPORTANT:  Variables may NOT be substituted within the function
  522.        name or switches.  They may be substituted anywhere else, even for
  523.        the commas separating arguments.
  524.  
  525.  
  526.        Reserved Variables
  527.        ==================
  528.  
  529.        Certain variables have fixed names so that {COMMO} can find them
  530.        whenever they are needed.  You must define some of these to enable
  531.        special program features.  Others are defined by {COMMO} based on
  532.        operating conditions.
  533.  
  534.        Reserved variable names begin with an underline character "_" to
  535.        distinguish them from ordinary variables.
  536.  
  537.        If you define a variable using a reserved name, it will override the
  538.        original reserved variable.  Variables such as "_hom" are defined by
  539.        {COMMO} only at startup and will therefore be lost for the session.
  540.  
  541.        Here is a list of reserved variables that are entered in String
  542.        Variable Space:
  543.  
  544.           _modini        Modem Initialization String
  545.           _dialpf        Default Dialing Prefix
  546.           _dialsf        Default Dialing Suffix
  547.           _dialsr        Dialing Success responses
  548.           _dialfr        Dialing Failure responses
  549.           _uselog        Pathname of Usage Log
  550.  
  551.  
  552.        Here is a list of "built-in" variables that do not appear in String
  553.        Variable Space:
  554.  
  555.           _hom           {COMMO} home directory: c:\commo\, etc.
  556.           _set           Filename of Setup File
  557.           _fon           Filename of Dialing Directory
  558.           _mac           Filename of default Macro File
  559.           _cap           Current Capture File pathname
  560.           _scr           Current Screen Image File pathname
  561.  
  562.  
  563.  
  564.                    {COMMO} (tm)  Macro Programming Guide            page 7
  565.  
  566.  
  567.           _err           Errorlevel from last EXEC-D, RXMOdem or SXMOdem
  568.           _pos           Position in string
  569.           _len           Length of string
  570.           _por           Current serial port number: 1, 2, etc.
  571.           _spe           Current serial port speed: 2400, 9600, etc.
  572.           _mod           Last speed reported by modem
  573.           _pas           Current Password String
  574.           _ela           Elapsed time in minutes
  575.           _dat           Full date, mm/dd/yy
  576.           _mon           Month, mm
  577.           _day           Day of the month, dd
  578.           _yea           Year, yy
  579.           _tim           Full time, hh:mm xm (am or pm)
  580.           _24h           24 hour, hh
  581.           _12h           12 hour, hh
  582.           _amp           Am/pm indicator, xm
  583.           _min           Minute, mm
  584.           _sec           Second, ss
  585.  
  586.        Any variable that starts with the same four characters as a built-in
  587.        variable will be considered the same variable.  For example "_pas"
  588.        may be written "_password" and "_yea" may be written "_year".
  589.  
  590.        NOTE:  Any attempt to set a built-in variable will make an entry in
  591.        variable space, thus effectively redefining it (it's built-in value
  592.        will not be available until this entry is defined as null).
  593.  
  594.  
  595.        Executing Macros
  596.        ================
  597.  
  598.        Macro execution may be started in any of the following ways:
  599.  
  600.        1) Open the Macro Processor window by pressing Alt-M.  Position the
  601.           Selector Bar at the desired starting point and press [Enter]. 
  602.           The Macro Processor will begin processing at the first macro
  603.           label or function on the line.
  604.  
  605.           NOTE:  Macros started with the Selector Bar do not need macro
  606.           labels and may be started at any point within the macro.
  607.  
  608.        2) If a macro label is also a key-label, then you may press that key
  609.           from the Terminal Screen.  Note that if the same key-label
  610.           appears more than once, the first occurrence will be used.
  611.  
  612.        3) A macro may be linked to a Dialing Directory entry.  In this case
  613.           {COMMO} will GOTO the macro when a connection is established with
  614.           that system (or optionally CALL it, see the DIAL function).
  615.  
  616.        4) A macro to run when {COMMO} is started may be specified in the
  617.           Setup File using the "{mac=label}" item.
  618.  
  619.  
  620.  
  621.                    {COMMO} (tm)  Macro Programming Guide            page 8
  622.  
  623.  
  624.        5) A macro to run when {COMMO} is started may be specified on the
  625.           command line with the switch "/:label".  This will override the
  626.           Setup File macro.
  627.  
  628.        6) A macro may be an argument of another function such as CALL,
  629.           GOTO, DIAL or SETLook (these are detailed in a later section).
  630.  
  631.        Some macro functions show their current action on the status line at
  632.        the bottom of the screen.  In addition, a "face" character in the
  633.        middle of the status line indicates that a macro is executing.
  634.  
  635.  
  636.        Additional Macro Execution Rules
  637.        ================================
  638.  
  639.        ASCII keys may be typed to the serial port during LOOKfor,
  640.        GETString, PAUSe and HOLD functions.
  641.  
  642.        The Macro Processor will execute functions in order until one of the
  643.        following conditions occurs:
  644.  
  645.        1) A CALL, GOTO, RETURn, STOP, EXIT, etc. is encountered.
  646.  
  647.        2) Control is transferred to an alternate macro from certain
  648.           functions when a special condition occurs.  An example of this is
  649.           the SETLook function.  The alternate will execute when a
  650.           subsequent LOOKfor times out.
  651.  
  652.        3) A macro error occurs.  This will bring up the Macro Processor
  653.           window with the Selector Bar on the problem line.  The macro is
  654.           terminated.
  655.  
  656.        4) The end of the Macro File is reached.
  657.  
  658.  
  659.        Cancelling a Macro
  660.        ==================
  661.  
  662.        The [Esc] key is used to terminate macro processing.  To send an
  663.        <esc> code to the remote (ASCII 27) during macro execution, press
  664.        Ctrl-[ (Ctrl + left bracket).
  665.  
  666.        Current function execution may be terminated by pressing
  667.        [Ctrl-Break].  For example, this can be used to terminate a LOOKfor,
  668.        PAUSe or HOLD prematurely.  Macro processing will advance to the
  669.        next function.
  670.  
  671.        If a macro contains a function that brings up a {COMMO} window
  672.        (Dialing Directory, Capture File Options, etc.), then [Esc] will
  673.        exit the window and processing continues with the next function.  To
  674.        terminate macro processing from a window, press [Ctrl-Break].
  675.  
  676.  
  677.  
  678.                    {COMMO} (tm)  Macro Programming Guide            page 9
  679.  
  680.  
  681.        NOTE:  The SETEsc function may be used to prevent premature
  682.        termination of macros.
  683.  
  684.  
  685.        =======================================
  686.        Description of Functions (Alphabetical)
  687.        =======================================
  688.  
  689.        The purpose of this section is to show the syntax of each function
  690.        and the meaning of its arguments through examples.  All functions
  691.        are listed here, but details on functions which are also default key
  692.        commands are found in COMMO.DOC under "{COMMO} Key Commands."
  693.  
  694.        Function names are shown with their four-letter abbreviations in
  695.        uppercase.
  696.  
  697.        For consistency, the following conventions are used in many
  698.        functions:
  699.  
  700.           "y" or "yes" is used to indicate "yes", "on",  "open",  etc.
  701.           "n" or "no"  is used to indicate "no",  "off", "close", etc.
  702.  
  703.  
  704.        ABAUd
  705.        -----
  706.        Default key: none
  707.        Description: Set AutoBaud toggle.
  708.  
  709.        Examples:
  710.  
  711.           {abaud}             Toggle AutoBaud on/off
  712.           {abaud y}           Turn on AutoBaud     
  713.           {abaud n}           Turn off AutoBaud
  714.  
  715.  
  716.        ALARm
  717.        -----
  718.        Default key: none
  719.        Description: Ring the alarm.
  720.  
  721.        Examples:
  722.  
  723.           {alarm}             Ring alarm, use ring count in Setup File.
  724.           {alarm 2}           Ring alarm 2 times.
  725.  
  726.        {COMMO} will wait until the alarm has stopped ringing before
  727.        proceeding to the next macro function (the alarm may be terminated
  728.        early by pressing a key).
  729.  
  730.  
  731.  
  732.                    {COMMO} (tm)  Macro Programming Guide            page 10
  733.  
  734.  
  735.        ASCIiup
  736.        -------
  737.        Default key: Alt-A
  738.        Description: Upload an ASCII (text) file.
  739.  
  740.        General form:
  741.  
  742.           {ASCIiup pathname[\],pace}
  743.  
  744.                pathname       The complete path and filename (if the path
  745.                               is absent, the current directory will be
  746.                               used). 
  747.  
  748.                               If a "\" is placed at the end of the
  749.                               pathname, the path will appear as a prompt in
  750.                               the ASCII Upload window.
  751.  
  752.                pace           The pacing character to be used.
  753.  
  754.        Switches:
  755.  
  756.                E1 or E   Expand blank lines.  A space will be sent when a
  757.                          zero-character line is encountered.
  758.  
  759.                E0        Do not expand blank lines.
  760.  
  761.                S1 or S   Strip linefeeds from outgoing text.
  762.  
  763.                S0        Do not strip linefeeds.
  764.  
  765.                          If a switch is absent, the current setting of the
  766.                          toggle will be used.  The toggles can be set in
  767.                          the Setup File or by using the Alt-T key command.
  768.  
  769.                          Switches apply to the current function only and do
  770.                          not affect the setting of the toggles.
  771.  
  772.        Examples:    
  773.  
  774.           {asci}                        Open ASCII Upload window.
  775.  
  776.           {asci-S}                      Open ASCII Upload window, strip
  777.                                         linefeeds when file is sent.
  778.  
  779.           {asci %uldir%\}               Open ASCII Upload window, prompt
  780.                                         with the current value of the
  781.                                         variable "uldir".
  782.  
  783.           {asci c:\msgs\file.xyz,:}     Upload "file.xyz."  Use ":" for
  784.                                         pacing.
  785.  
  786.  
  787.  
  788.                    {COMMO} (tm)  Macro Programming Guide            page 11
  789.  
  790.  
  791.           {asci-E0 c:\msgs\file.xyz}    Same, but use current pacing
  792.                                         character, do not expand blank
  793.                                         lines.
  794.  
  795.           {asci c:\msgs\file.xyz,}      Same, but no pacing.
  796.  
  797.           {asci ,?}                     Set current pacing character to "?"
  798.  
  799.           {asci ,}                      Set current pacing to "no" pacing.
  800.  
  801.        The pacing character may be entered according to the rules in
  802.        Appendix D "ASCII Character Representation."  For example, "^m" or
  803.        "|" may be used to represent the carriage return.
  804.  
  805.  
  806.        AUTO
  807.        ----
  808.        Default key: none
  809.        Description: Maintain Auto Receive strings.
  810.  
  811.        General form:
  812.  
  813.           {AUTO label,string}
  814.  
  815.                label          Label to GOTO when the string is received.
  816.                string         String to look for, may be up to 32
  817.                               characters.
  818.  
  819.        Examples:
  820.  
  821.           {auto}                   Clear all Auto Receive strings.
  822.           {auto zmodem,^XB00}      Zmodem Auto Receive string.
  823.  
  824.        Note that only 8 Auto Receive strings may be in effect at the same
  825.        time (including any strings defined in the Setup File).  Use this
  826.        function with no arguments to clear all strings when necessary.
  827.  
  828.  
  829.        BEEP
  830.        ----
  831.        Default key: none
  832.        Description: Sound a beep.
  833.  
  834.        Example:
  835.  
  836.           {beep}              No arguments.
  837.  
  838.  
  839.        BREAk
  840.        -----
  841.        Default key: Alt-B
  842.        Description: Send a break.
  843.  
  844.  
  845.  
  846.                    {COMMO} (tm)  Macro Programming Guide            page 12
  847.  
  848.  
  849.  
  850.        Example:
  851.  
  852.           {break}             No arguments.
  853.  
  854.  
  855.        CALL
  856.        ----
  857.        Default key: none
  858.        Description: Execute another macro.
  859.  
  860.        Example:
  861.  
  862.           {call abc}          Execute macro abc.
  863.  
  864.        If the macro "abc" executes a RETUrn function, then control returns
  865.        to the function following the CALL.
  866.  
  867.        Note that macros may be nested up to 32 deep.
  868.  
  869.        See also RETUrn, PUSHstack, POPStack.
  870.  
  871.  
  872.        CAPMode
  873.        -------
  874.        Default key: none
  875.        Description: Set Capture Mode.
  876.  
  877.        Examples:
  878.  
  879.           {capmode screen}         Set Capture Mode to SCREEN.
  880.           {capmode filter}         Set Capture Mode to FILTER.
  881.           {capmode raw}            Set Capture Mode to RAW.
  882.  
  883.  
  884.        CAPTure
  885.        -------
  886.        Default key: Alt-1
  887.        Description: Capture File Options.
  888.  
  889.        Examples:
  890.  
  891.           {capture}                     Open Capture File Options window.
  892.  
  893.           {capture y}                   Open current Capture File.
  894.  
  895.           {capture n}                   Close current Capture File.
  896.  
  897.           {capt y,c:\commo\file.xyz}    Open indicated Capture File.
  898.  
  899.           {capt n,c:\dl\newfile.cap}    Close current Capture File, set new
  900.                                         file as indicated.
  901.  
  902.  
  903.  
  904.                    {COMMO} (tm)  Macro Programming Guide            page 13
  905.  
  906.  
  907.  
  908.        NOTE:  The current Capture File will always be closed when a new
  909.        file is opened.
  910.  
  911.        See also CAPMode.
  912.  
  913.  
  914.        CHATmode
  915.        --------
  916.        Default key: Alt-- (Alt minus)
  917.        Description: Set Chat Mode toggle.
  918.  
  919.        Examples:
  920.  
  921.           {chat}              Toggle Chat Mode on/off.
  922.           {chat y}            Turn on Chat Mode.
  923.           {chat n}            Turn off Chat Mode.
  924.  
  925.  
  926.        CLEAr
  927.        -----
  928.        Default key: Alt-C
  929.        Description: Clear Terminal Screen to default colors.
  930.  
  931.        Example:
  932.  
  933.           {clear}             No arguments.
  934.  
  935.  
  936.        COMPare
  937.        -------
  938.        Default key: none
  939.        Description: Compare a string or numeric variable.
  940.  
  941.        General form:
  942.  
  943.           {COMPare name,string}
  944.  
  945.                name           The name of a variable.
  946.  
  947.                string         A string of ASCII characters.
  948.  
  949.        Examples:
  950.  
  951.           {comp pword,aardvark}         Test if the variable "pword" is set
  952.                                         to "aardvark."
  953.  
  954.           {comp pword}                  Test if "pword" is null.
  955.           {comp pword,}                 Test if "pword" is null.
  956.  
  957.           {comp nmbr,5}                 Compare a numeric variable.
  958.  
  959.  
  960.  
  961.                    {COMMO} (tm)  Macro Programming Guide            page 14
  962.  
  963.  
  964.           {comp abc,%xyz}               Test if the variable "abc" is equal
  965.                                         to the variable "xyz."
  966.  
  967.        A numeric variable is a string of ASCII digits, 0-9, forming a
  968.        positive integer in the range from 0 to 65535.  If the number is
  969.        outside this range or contains non-numeric characters, the results
  970.        of the compare will be unpredictable.
  971.  
  972.        COMPare will set flags which can be tested with the IFCOndition
  973.        function.
  974.  
  975.           The Condition Flag will be set to "true" if the two arguments are
  976.           identical strings (case is ignored).  Otherwise it will be set to
  977.           "false."
  978.  
  979.           The Numeric Flag will be set to "equal", "less than" or "greater
  980.           than."  This flag is unpredictable unless both arguments are
  981.           valid numerics.
  982.  
  983.        A variable may be tested for being null (no entry in variable space)
  984.        by omitting the second argument (or by comparing to a null
  985.        variable).
  986.  
  987.        See also IFCOndition.
  988.  
  989.  
  990.        CURSor
  991.        ------
  992.        Default key: none
  993.        Description: Terminal Screen cursor on/off.
  994.  
  995.        Examples:
  996.  
  997.           {cursor}            Toggle Terminal cursor on/off.
  998.           {curs y}            Turn on Terminal Screen cursor.
  999.           {curs n}            Turn off Terminal Screen cursor.
  1000.  
  1001.  
  1002.        DECRement
  1003.        ---------
  1004.        Default keys: none
  1005.        Description: Subtract an amount from a numeric variable.
  1006.  
  1007.        Examples:
  1008.  
  1009.           {decr number,200}   Subtract 200 from "number".
  1010.           {decr count}        Subtract 1 from the variable "count".
  1011.  
  1012.        Numeric variables and the amounts to be subtracted may range from 0
  1013.        to 65535.  The default amount is 1.  Results less than 0 will be set
  1014.        to 0.
  1015.  
  1016.  
  1017.  
  1018.                    {COMMO} (tm)  Macro Programming Guide            page 15
  1019.  
  1020.  
  1021.        If the variable is not numeric, the results will be unpredictable.
  1022.  
  1023.        See also INCRement.
  1024.  
  1025.  
  1026.        DIAL
  1027.        ----
  1028.        Default keys: Alt-D, Alt-U
  1029.        Description: Dialing Directory.
  1030.  
  1031.        General form:
  1032.  
  1033.           {DIAL tries,label}
  1034.  
  1035.                tries     The maximum number of dialing tries.  If no
  1036.                          connection is established when the try count is
  1037.                          exhausted, the macro in the second argument will
  1038.                          be started.  May be 0 to 999.  "0" means
  1039.                          unlimited.  Default is 0.
  1040.  
  1041.                label     A macro to GOTO if the try count in the first
  1042.                          argument is exhausted.  If no macro is specified
  1043.                          or if the macro label is invalid, control will
  1044.                          pass to the next function.  Default is none.
  1045.  
  1046.        Switches:
  1047.  
  1048.                C1 or C   Specifies that a Linked Macro (from the Dialing
  1049.                          Directory) will be entered via CALL (instead of
  1050.                          GOTO).  When the Linked Macro executes a RETUrn,
  1051.                          control returns to the DIAL function and Multi
  1052.                          Number Dialing will resume (see below).
  1053.  
  1054.                C0        Enter the Linked Macro via GOTO (default).
  1055.  
  1056.  
  1057.        Examples:
  1058.  
  1059.           {dial}              Open Dialing Directory window (like Alt-D).
  1060.  
  1061.           {dial ,}            Multi Number Dial (like Alt-N).
  1062.  
  1063.           {dial 25,abc}       Multi Number Dial with try count.
  1064.  
  1065.           {dial-C ,}          Multi Number Dial, CALL Linked Macros.
  1066.  
  1067.  
  1068.        Marked numbers will be redialed in sequence.  Numbers may be marked
  1069.        in one of several ways:
  1070.  
  1071.           1)   Manually in the Dialing Directory window.
  1072.           2)   By placing Dialing Strings on the {COMMO} command line.
  1073.  
  1074.  
  1075.  
  1076.                    {COMMO} (tm)  Macro Programming Guide            page 16
  1077.  
  1078.  
  1079.           3)   Using the MARK macro function.
  1080.  
  1081.        If a connection occurs and a valid Linked Macro is specified in the
  1082.        Dialing Directory, the macro will be started (via GOTO unless the
  1083.        "C" switch is present).  If no macro is specified in the Dialing
  1084.        Directory, control is passed to the next function.
  1085.  
  1086.  
  1087.        To automatically resume Multi Number Dialing at the end of a Linked
  1088.        Macro, use one of the following methods.
  1089.  
  1090.           1)   Execute the following sequence at the end of each Linked
  1091.                Macro (or GOTO it):
  1092.  
  1093.                ... {setlook 60} {lookfor ^jNO CARRIER^m} {dial ,} {}
  1094.  
  1095.                This allows more than one system to be called without
  1096.                operator intervention.  This method will also work when
  1097.                using Dialing Strings on the command line or when pressing
  1098.                Alt-U after marking systems for dialing.
  1099.  
  1100.           2)   Use the "C" switch in the DIAL function.  Each Linked Macro
  1101.                should end with a RETUrn which will transfer control back to
  1102.                the DIAL.  When all numbers have been called, the DIAL will
  1103.                pass control to the next function in sequence.
  1104.  
  1105.        See also: MARK, UNMArk.
  1106.  
  1107.  
  1108.        DISPlay
  1109.        -------
  1110.        Default key: none
  1111.        Description: Display a string to the screen.
  1112.  
  1113.        General form:
  1114.  
  1115.           {DISPlay row,col,attr,string}
  1116.  
  1117.                row       The row where the string will display.
  1118.                col       The column where the string will display.
  1119.                attr      The attribute (colors) of the string.
  1120.                string    The text of the string (no quotes).
  1121.  
  1122.        Examples:
  1123.  
  1124.           {display 12,20,17,Hello!}     Display "Hello!" at row 12, column
  1125.                                         20.  Colors are white on blue.
  1126.  
  1127.           {disp ,,,Hello, again.^m^j}   Display "Hello, again." at the
  1128.                                         current cursor using the current
  1129.                                         attribute, followed by a cr/lf.
  1130.  
  1131.  
  1132.  
  1133.                    {COMMO} (tm)  Macro Programming Guide            page 17
  1134.  
  1135.  
  1136.           {disp 3,40}                   Position the cursor at row 3,
  1137.                                         column 40.
  1138.  
  1139.        The attribute is specified in the same manner as the colors in the
  1140.        Setup File (press F10 in the Internal Editor to display the Color
  1141.        Chart).
  1142.  
  1143.        Setting background colors to high intensity values will cause
  1144.        blinking (for example, using "9" instead of "1" will still give a
  1145.        blue background but the foreground character will blink).  
  1146.  
  1147.        After the string is displayed, the previous Terminal Screen
  1148.        attribute will be restored.
  1149.  
  1150.        Note that translation is performed on the string according to the
  1151.        rules in Appendix D.
  1152.  
  1153.  
  1154.        DOORway
  1155.        -------
  1156.        Default key: Alt-=
  1157.        Description: Toggle Doorway Mode.
  1158.  
  1159.        Switches:
  1160.  
  1161.                S1 or S   Status Line on when entering Doorway Mode.
  1162.  
  1163.                S0        Status Line off (default).
  1164.  
  1165.                M0        Do not display Doorway enter/exit messages.
  1166.  
  1167.                M1        Display enter/exit messages (default).
  1168.  
  1169.        Examples:
  1170.  
  1171.           {doorway}           Toggle Doorway Mode on/off.
  1172.           {door-S}            Status Line on when entering Doorway Mode.
  1173.           {doorway-M0}        Do not display enter/exit messages.
  1174.  
  1175.        The "S" switch is ignored when exiting Doorway Mode (the Status Line
  1176.        will be restored to its prior state).
  1177.  
  1178.  
  1179.        DPARms
  1180.        -----
  1181.        Default key: Alt-P
  1182.        Description: Set Dialing Default Terminal Parameters
  1183.  
  1184.        General form:
  1185.  
  1186.           {DPARms speed,format,comport,terminal-type,delay}
  1187.  
  1188.  
  1189.  
  1190.                    {COMMO} (tm)  Macro Programming Guide            page 18
  1191.  
  1192.  
  1193.                speed          The bps rate: 2400, 9600, etc.
  1194.                format         The data format: 8n1, 7e1, etc.
  1195.                comport        The serial port number: 1, 2, 3 or 4.
  1196.                terminal       The terminal-type: A, V or T.
  1197.                delay          The inter-character delay factor: 0-999.
  1198.  
  1199.        Examples:
  1200.  
  1201.           {dparms 2400,8,1,,20}    Set 2400 bps, 8n1, Com1, delay = 20.
  1202.  
  1203.           {dparms ,,4,V}           Set Com4 VT102.
  1204.  
  1205.           {dparms 19200,7o1}       Set 19200 bps, 7o1.
  1206.  
  1207.        Note that omitted parameters are not changed.
  1208.  
  1209.        See also PARMs.
  1210.  
  1211.  
  1212.        EDIT
  1213.        ----
  1214.        Default key: none
  1215.        Description: Edit an external file.
  1216.  
  1217.        Example:
  1218.  
  1219.           {edit c:\autoexec.bat}        Edit AUTOEXEC.BAT file.
  1220.  
  1221.        EDIT may be used to edit any text file up to 64k in length.  The
  1222.        rules are the same as for editing a support file with the Internal
  1223.        Editor.  Be aware of the following:
  1224.  
  1225.        1) Control characters (below ASCII 28) may not be typed.
  1226.        2) Blank lines at the end of the file and end-of-file marks will be
  1227.           removed prior to editing.
  1228.        3) The file will be "saved in place" (no backup) when Alt-F or Esc
  1229.           is pressed.
  1230.  
  1231.  
  1232.        ELAPse
  1233.        ------
  1234.        Default key: none
  1235.        Description: Reset the elapsed timer to 0 minutes.
  1236.  
  1237.        Example:
  1238.  
  1239.           {elap}              No arguments.
  1240.  
  1241.        The elapsed timer is automatically reset whenever dialing begins and
  1242.        when a connection is made with a remote system.
  1243.  
  1244.  
  1245.  
  1246.                    {COMMO} (tm)  Macro Programming Guide            page 19
  1247.  
  1248.  
  1249.        EXECute
  1250.        -------
  1251.        Default key: none
  1252.        Description: Execute a DOS command.
  1253.  
  1254.        Switches:
  1255.  
  1256.                A1 or A   Sound the alarm at the end of command execution.
  1257.  
  1258.                A0        Do not sound the alarm (default).
  1259.  
  1260.                D1 or D   Execute an external program directly, without use
  1261.                          of the command processor (see details below).
  1262.  
  1263.                D0        Use the command processor (default).
  1264.  
  1265.                N1 or N   Do not clear the screen before execution.  This is
  1266.                          useful when running programs that clear or rewrite
  1267.                          the screen.  Also for simple DOS functions like
  1268.                          changing directories, renaming files, etc.  
  1269.  
  1270.                N0        Clear the screen (default).
  1271.  
  1272.                W1 or W   Wait (pause) before restoring the Terminal Screen. 
  1273.                          This is useful if you need to see the results of
  1274.                          the command execution.
  1275.  
  1276.                W0        Do not wait (default).
  1277.  
  1278.        Examples:
  1279.  
  1280.           {exec-AW dsz port %_por speed %_spe sz %uldir%\%file}
  1281.  
  1282.                {COMMO} will prepare the DSZ command by expanding the "%"
  1283.                variables, then call DOS to execute the program.
  1284.  
  1285.                See the section "Macro Variables" for complete details on
  1286.                variable substitution.
  1287.  
  1288.                The alarm will sound at completion (the "A" switch) and
  1289.                {COMMO} will wait for a keypress (the "W" switch) before
  1290.                restoring the Terminal Screen.
  1291.  
  1292.           {execute-DN c:\utils\list.com %_cap}
  1293.  
  1294.                The LIST program will be directly executed with the current
  1295.                Capture File pathname as a command line argument.  The
  1296.                screen will not be cleared (LIST will rewrite the screen). 
  1297.                {COMMO} will return immediately to the Terminal Screen when
  1298.                LIST exits.
  1299.  
  1300.  
  1301.  
  1302.                    {COMMO} (tm)  Macro Programming Guide            page 20
  1303.  
  1304.  
  1305.        The EXECute function enables you to "build" a command to be executed
  1306.        by DOS.  The DOS command processor (COMMAND.COM) is normally used
  1307.        (see below), which implies that you may specify any command as you
  1308.        would type it from the DOS prompt.
  1309.  
  1310.        Thus you can execute batch files and internal DOS commands (REN,
  1311.        DEL, etc.).  Also you can omit command paths and extensions (if the
  1312.        command is in your PATH or in the current directory).
  1313.  
  1314.        Character translation is performed in the EXECute function.  This
  1315.        enables you to specify control characters.  For example:
  1316.  
  1317.                {exec echo ^L> prn}   Send a formfeed to the printer
  1318.  
  1319.        See Appendix D for details on translation.  Note that the vertical
  1320.        bar "|" is not translated to a carriage return in an EXECute
  1321.        function.  
  1322.  
  1323.  
  1324.        Using the Direct Switch: exec-D
  1325.        -------------------------------
  1326.  
  1327.        Use this switch to execute .EXE and .COM programs without the use of
  1328.        the command processor (COMMAND.COM, usually).
  1329.  
  1330.        The program's Exit Code (called ERRORLEVEL in batch files) is saved
  1331.        and may be tested with the IFERrorlevel function.  The Exit Code is
  1332.        also available in the variable "_err".
  1333.  
  1334.        There are several advantages to using the "D" switch:
  1335.  
  1336.        1) Only the memory needed to run the program is required (the
  1337.           command processor requires that about 32k be available, even if
  1338.           the program being run is much smaller).
  1339.  
  1340.        2) About 4k of memory is saved by not having a copy of the command
  1341.           processor resident when the program is running.
  1342.  
  1343.        3) The program executes faster, since COMMAND.COM is not loaded from
  1344.           disk.
  1345.  
  1346.        4) The program's Exit Code is preserved and may be tested with the
  1347.           {COMMO} IFERrorlevel function.
  1348.  
  1349.        Two important rules must be followed when using the "D" switch:
  1350.  
  1351.        1) The full pathname of the program file must be specified,
  1352.           including the path where the file resides on disk and the file
  1353.           extension.  For example:
  1354.  
  1355.                {exec-D c:\util\list.com file.txt}
  1356.  
  1357.  
  1358.  
  1359.                    {COMMO} (tm)  Macro Programming Guide            page 21
  1360.  
  1361.  
  1362.        2) Only .EXE and .COM files may be run (batch files and internal DOS
  1363.           commands cannot be executed without the command processor).
  1364.  
  1365.  
  1366.        EXECute Preview Mode
  1367.        --------------------
  1368.  
  1369.        Use the Set Toggles key command, Alt-T, to turn on "EXECute Preview
  1370.        Mode."  This mode is used to test your DOS commands and performs the
  1371.        following steps for each EXECute function:
  1372.  
  1373.        1) The command will be displayed after expanding variables and
  1374.           translating control characters.
  1375.  
  1376.        2) You will be given an opportunity to cancel the command before it
  1377.           is executed.
  1378.  
  1379.        3) {COMMO} will wait before restoring the Terminal Screen after
  1380.           execution.  This lets you see any error messages the command may
  1381.           have displayed.
  1382.  
  1383.  
  1384.        EXIT
  1385.        ----
  1386.        Default key: Alt-X
  1387.        Description: Exit {COMMO}.
  1388.  
  1389.        Switches:
  1390.  
  1391.                D1 or D   Drop DTR and RTS.  Dropping DTR will cause the
  1392.                          modem to disconnect if it has been properly
  1393.                          initialized.  See Appendix A.
  1394.  
  1395.                D0        Do not drop DTR and RTS.
  1396.  
  1397.                          If the switch is absent, the current setting of
  1398.                          the toggle will be used.  The toggle can be set in
  1399.                          the Setup File or by using the Alt-T key command.
  1400.  
  1401.        Examples:
  1402.  
  1403.           {exit}              No arguments (return code = 0).
  1404.           {exit 3}            With return code.
  1405.           {exit-D}            Drop DTR and RTS.
  1406.  
  1407.        The return code will be passed to DOS.  It may be tested with the IF
  1408.        ERRORLEVEL batch command.  Range is 0 to 255.
  1409.  
  1410.  
  1411.  
  1412.                    {COMMO} (tm)  Macro Programming Guide            page 22
  1413.  
  1414.  
  1415.        GETString
  1416.        ---------
  1417.        Default key: none
  1418.        Description: Input a string from the modem to a variable.
  1419.  
  1420.        General form:
  1421.  
  1422.           {GETString name,count,label}
  1423.  
  1424.                name      The name of the variable to which the string will
  1425.                          be assigned.
  1426.  
  1427.                count     The maximum number of data characters allowed.  A
  1428.                          carriage return will always terminate input.  May
  1429.                          be 1 to 240.  Default is 240.
  1430.  
  1431.                label     A macro to GOTO if a carriage return is received
  1432.                          and no characters have been entered (the string
  1433.                          will be assigned as null).  If this argument is
  1434.                          omitted, control will pass to the next function.
  1435.  
  1436.        Switches:
  1437.  
  1438.                H1 or H   "Hotkey" mode.  When the maximum number of
  1439.                          characters has been entered, control will pass to
  1440.                          the next function.
  1441.  
  1442.                H0        Ignore all input after the maximum has been
  1443.                          entered, except backspace and carriage return
  1444.                          (default).
  1445.  
  1446.        Example:
  1447.  
  1448.           {setget 60,timeout,y,^m^j}         Set GETString parameters.
  1449.           {gets fonum,12,badinput}           Get input to "fonum."
  1450.  
  1451.  
  1452.        TIPS on using GETString:
  1453.  
  1454.        >  The only control characters allowed (below ASCII 28) are carriage
  1455.           return (ASCII 13) and backspace (ASCII 8).  Other control
  1456.           characters should be entered as ^J for linefeed, etc.  See
  1457.           Appendix D.
  1458.  
  1459.        >  Destructive backspace processing is supported for editing
  1460.           purposes.
  1461.  
  1462.        >  GETString supports "tandem" input.  Characters entered at either
  1463.           end will be input to the string (and displayed at both ends if
  1464.           echo is on (see SETGet).  Turn on Local Echo to see text locally
  1465.           that is sent to the remote with SEND, ASCIiup, etc.
  1466.  
  1467.  
  1468.  
  1469.                    {COMMO} (tm)  Macro Programming Guide            page 23
  1470.  
  1471.  
  1472.        >  Use the "H" switch and a character count of 1 for "hotkeys" or
  1473.           for password input as in this example:
  1474.  
  1475.                {local y}                     Local echo for SENDs
  1476.                {setv pword}                  Initialize to null
  1477.                {setg 120,error,n}            No echo, no terminator resp.
  1478.                {send ^m^j^jPassword: }       Prompt
  1479.           {:passloop}
  1480.                {gets-h temp,1,done}          Single character "hot" input
  1481.                {setv pword,%pword%%temp}     Concatenate each character
  1482.                {send .}                      Echo "dots"
  1483.                {goto passloop}               Loop until <cr> entered
  1484.           {:done}
  1485.                {send ^m^j}                   cr/lf
  1486.                ...
  1487.  
  1488.        >  Turn off echo in the SETGet while waiting for the modem to answer
  1489.           (in host mode).  Some modems react poorly to characters being
  1490.           echoed when they are generating a response (such as "RING").
  1491.  
  1492.        >  Incoming characters displayed during a GETString function are not
  1493.           seen by subsequent GOLOok/LOOKfor functions.
  1494.  
  1495.        See also SETGet.
  1496.  
  1497.  
  1498.        GOLOok
  1499.        ------
  1500.        Default key: none
  1501.        Description: Set a macro label to GOTO if a string comes in during a
  1502.                     subsequent LOOKfor function.
  1503.  
  1504.        Example construct:
  1505.  
  1506.                     {setlook 60,hng,3,n|}
  1507.                       ...
  1508.  
  1509.           {:mac}    {golook aaa,string1}
  1510.                     {golook ,string2}
  1511.                     {golook bbb,string3}
  1512.                     {lookfor string4} {send answer4|} {goto ccc}
  1513.  
  1514.           {:aaa}    {send answer1|} {goto mac}
  1515.           {:bbb}    {call xyz} {goto mac}
  1516.  
  1517.           {:ccc}      ...
  1518.  
  1519.        In this example {COMMO} will look for four strings.  When any string
  1520.        comes in, the LOOKfor is terminated (all strings are cancelled).  It
  1521.        may be set up again by going back to "mac."
  1522.  
  1523.  
  1524.  
  1525.                    {COMMO} (tm)  Macro Programming Guide            page 24
  1526.  
  1527.  
  1528.        The GOLOok functions for string1 and string3 will GOTO "aaa" or
  1529.        "bbb" respectively if one of the strings comes in.  In the example
  1530.        control returns to "mac" and the four strings will continue to be
  1531.        looked for.
  1532.  
  1533.        The GOLOok for string2 has a null label and control will pass to the
  1534.        function following the LOOKfor if the string comes in.  The "," must
  1535.        be present.
  1536.  
  1537.        If string4 comes in, control will also pass to the function
  1538.        following the LOOKfor.
  1539.  
  1540.        TIPS on using the GOLOok function:
  1541.  
  1542.        >  GOLOok functions should immediately precede a LOOKfor (no string
  1543.           compares actually occur until the LOOKfor executes).  Up to 15
  1544.           GOLOoks may be used for a total of up to 16 strings to scan for.
  1545.  
  1546.        >  If two or more strings cause a match at the same time, the LAST
  1547.           such string listed is the one acted upon.  For example, when
  1548.           "abcdef" and "def" are listed and "abcdef" comes in.
  1549.  
  1550.        >  Since the LOOKfor is terminated whenever any of the strings come
  1551.           in (or when the LOOKfor timeout expires), this structure is
  1552.           unrestricted -- that is, CALLs, GOTOs, other GOLOok/LOOKfor
  1553.           constructs, etc., may be used freely in any of the branches.
  1554.  
  1555.        >  See the PUSHstack function for an example showing how to improve
  1556.           the structure of the GOLOok/LOOKfor sequence.
  1557.  
  1558.        See also "TIPS on creating LOOKfor strings" in the section
  1559.        describing the LOOKfor function.
  1560.  
  1561.        See also: LOOKfor, SETLook, PUSHstack, POPStack.
  1562.  
  1563.  
  1564.        GOTO
  1565.        ----
  1566.        Default key: none
  1567.        Description: Transfer control to a macro label.
  1568.  
  1569.        Example:
  1570.  
  1571.           {goto x21}          Control transferred to label "x21".
  1572.  
  1573.  
  1574.        HANGup
  1575.        ------
  1576.        Default key: Alt-H
  1577.        Description: Disconnect by dropping DTR.
  1578.  
  1579.        Examples:
  1580.  
  1581.  
  1582.  
  1583.                    {COMMO} (tm)  Macro Programming Guide            page 25
  1584.  
  1585.  
  1586.  
  1587.           {hangup}            Prompt user for disconnect.
  1588.           {hangup y}          Disconnect without prompting.
  1589.  
  1590.  
  1591.        HELP
  1592.        ----
  1593.        Default key: F1
  1594.        Description: Open Online Help window.
  1595.  
  1596.        Example:
  1597.  
  1598.           {help}              Display topic 00
  1599.           {help 5}            Display topic 05
  1600.  
  1601.        Topic numbers may range from 00 to 99.  You may create your own
  1602.        Online Help file.  See "Modifying the Help File."
  1603.  
  1604.  
  1605.        HFLOw
  1606.        -----
  1607.        Default key: none
  1608.        Description: Set Hardware Flow Control toggle.
  1609.  
  1610.        Examples:
  1611.  
  1612.           {hflow}             Toggle Hardware Flow Control on/off.
  1613.           {hflow y}           Turn on Hardware Flow Control.
  1614.           {hflow n}           Turn off Hardware Flow Control.
  1615.  
  1616.  
  1617.        HOLD
  1618.        ----
  1619.        Default key: none
  1620.        Description: Hold until specified time of day (24 hour format).
  1621.  
  1622.        Examples:
  1623.  
  1624.           {hold 3:30}         Hold until 3:30 am.
  1625.           {hold 16:10}        Hold until 4:10 pm.
  1626.           {hold 0:00}         Hold until midnight.
  1627.  
  1628.        NOTE:  Incoming characters displayed during a HOLD function are not
  1629.        seen by subsequent GOLOok/LOOKfor functions.
  1630.  
  1631.  
  1632.        IFCArrier
  1633.        ---------
  1634.        Default key: none
  1635.        Description: Test for presence of carrier detect signal.
  1636.  
  1637.        General form:
  1638.  
  1639.  
  1640.  
  1641.                    {COMMO} (tm)  Macro Programming Guide            page 26
  1642.  
  1643.  
  1644.  
  1645.           {IFCArrier true,false}
  1646.  
  1647.                true           A label to GOTO if carrier is detected.
  1648.  
  1649.                false          A label to GOTO if carrier is not detected.
  1650.  
  1651.        NOTE:  The default when either label is omitted is to pass control
  1652.        to the next function.
  1653.  
  1654.        Example:
  1655.  
  1656.                {ifcarrier c10,c20}
  1657.  
  1658.        Tip on using IFCArrier:
  1659.  
  1660.           When using a loop to wait for a change in carrier detect, you
  1661.           should include a short pause in the loop if you want characters
  1662.           to display.  The following sequence will display incoming
  1663.           characters while waiting for carrier detect to drop:
  1664.  
  1665.                ... {:cd1} {pause 1} {ifcarrier cd1} ...
  1666.  
  1667.  
  1668.        IFCOndition
  1669.        -----------
  1670.        Default key: none
  1671.        Description: Test for conditions set by other functions.
  1672.  
  1673.        General form:
  1674.  
  1675.           {IFCOndition true,false}
  1676.  
  1677.                true      A label to GOTO if the Condition Flag is true.
  1678.  
  1679.                false     A label to GOTO if the Condition Flag is false.
  1680.  
  1681.        NOTE:  The default when either label is omitted is to pass control
  1682.        to the next function.
  1683.  
  1684.        Switches:
  1685.  
  1686.                none      Test the current state of the Condition Flag.
  1687.  
  1688.                E1 or E   Test for numeric equality.  A numeric string
  1689.                          contains only the digits 0-9 and is in the range 0
  1690.                          to 65535.
  1691.  
  1692.                L1 or L   Numeric test -- if first COMPare argument is less
  1693.                          than the second.
  1694.  
  1695.  
  1696.  
  1697.                    {COMMO} (tm)  Macro Programming Guide            page 27
  1698.  
  1699.  
  1700.                G1 or G   Numeric test -- if first COMPare argument is
  1701.                          greater than the second.
  1702.  
  1703.        Examples:
  1704.  
  1705.           {compare var1,message}        Compare and set Condition Flag.
  1706.           {ifcondit match,nomatch}      GOTO "match" if the variable "var1"
  1707.                                         is set to "message," to "nomatch"
  1708.                                         if it is not.
  1709.  
  1710.           {compare value,200}           Compare and set conditions.
  1711.           {ifcon-GE toobig,aok}         GOTO "toobig" if "value" is greater
  1712.                                         than or equal to 200, else GOTO
  1713.                                         "aok."
  1714.  
  1715.           {instring zipcode,90}         Test if "zipcode" contains the
  1716.           {ifcon yes,no}                digits "90".  If "true" GOTO "yes",
  1717.                                         if "false" GOTO "no".
  1718.  
  1719.        Switches may be used in any combination.  If any numeric switches
  1720.        are present, the Condition Flag is not tested.
  1721.  
  1722.        The difference between testing for string equality and numeric
  1723.        equality is shown in this example:
  1724.  
  1725.           The strings "05" and "5" are different text strings, but are
  1726.           numerically equal.
  1727.  
  1728.  
  1729.        IFERrorlevel
  1730.        ------------
  1731.        Default key: none
  1732.        Description: Test the Exit Code set by certain functions.
  1733.  
  1734.        General form:
  1735.  
  1736.           {IFERrorlevel number,true,false}
  1737.  
  1738.                number         A number from 0 to 255.  It will be compared
  1739.                               to the last Exit Code that was set.
  1740.  
  1741.                true           A label to GOTO if the Exit Code is greater
  1742.                               than or equal to "number."
  1743.  
  1744.                false          A label to GOTO if the Exit Code is less than
  1745.                               "number."
  1746.  
  1747.        NOTE:  The default when either label is omitted is to pass control
  1748.        to the next function.
  1749.  
  1750.        Example:
  1751.  
  1752.  
  1753.  
  1754.                    {COMMO} (tm)  Macro Programming Guide            page 28
  1755.  
  1756.  
  1757.                {iferror 1,abc,def}      GOTO "abc" if Exit Code is greater
  1758.                                         than or equal to 1.  Else GOTO def.
  1759.  
  1760.        TIPS on using IFERrorlevel:
  1761.  
  1762.        >  The Exit Code is set by certain functions (e.g., EXECute-D,
  1763.           SHELl, RXMOdem, SXMOdem) and should normally be tested
  1764.           immediately following execution of those functions.
  1765.  
  1766.        >  EXECute without the "D" switch or Shell to DOS will normally set
  1767.           the Exit Code to 0.
  1768.  
  1769.        >  Many programs return an Exit Code greater than 0 when the result
  1770.           is unsuccessful.  DSZ, for example, will return an Exit Code of 1
  1771.           if the file transfer has failed.
  1772.  
  1773.        >  The value of the Exit Code is also stored in the string variable
  1774.           "_err" and may be tested with COMPare.
  1775.  
  1776.  
  1777.        IFEXist
  1778.        -------
  1779.        Default key: none
  1780.        Description: Test for existence of a disk file or files.
  1781.  
  1782.        General form:
  1783.  
  1784.           {IFEXist pathname,true,false}
  1785.  
  1786.                pathname       A DOS pathname.  If the path is omitted, the
  1787.                               current directory will be used.  If wildcards
  1788.                               are used the "true" condition will hold if
  1789.                               any files match the specification.
  1790.  
  1791.                true           A label to GOTO if the file exists.
  1792.  
  1793.                false          A label to GOTO if no files match.
  1794.  
  1795.        NOTE:  The default when either label is omitted is to pass control
  1796.        to the next function.
  1797.  
  1798.        Examples:
  1799.  
  1800.           {ifex a:file.xyz,,m20}             GOTO "m20" if not found.
  1801.           {ifex c:\data\words.txt,345}       GOTO "345" if found.
  1802.           {ifex c:\ul\*.rep,a01,a02}         Using a wildcard.
  1803.  
  1804.  
  1805.        INCRement
  1806.        ---------
  1807.        Default keys: none
  1808.        Description: Add an amount to a numeric variable.
  1809.  
  1810.  
  1811.  
  1812.                    {COMMO} (tm)  Macro Programming Guide            page 29
  1813.  
  1814.  
  1815.  
  1816.        Examples:
  1817.  
  1818.           {incr number,1234}  Add 1234 to "number".
  1819.           {incr count}        Add 1 to the variable "count".
  1820.  
  1821.        Numeric variables and the amounts to be subtracted may range from 0
  1822.        to 65535.  The default amount is 1.  Results greater than 65535 will
  1823.        be set to 65535.
  1824.  
  1825.        If the variable is not numeric, the results will be unpredictable.
  1826.  
  1827.        See also INCRement.
  1828.  
  1829.  
  1830.        INITmodem
  1831.        ---------
  1832.        Default key: Alt-O
  1833.        Description: Send Modem Initialization String.
  1834.  
  1835.        Example:
  1836.  
  1837.           {init}              No arguments
  1838.  
  1839.  
  1840.        INPUt
  1841.        -----
  1842.        Default key: none
  1843.        Description: Input a string from the keyboard.
  1844.  
  1845.        General form:
  1846.  
  1847.           {INPUt name,prompt}
  1848.  
  1849.                name      The name of a string variable.  The current value
  1850.                          of this variable will appear in the input line.
  1851.  
  1852.                prompt    A prompt string that will appear in the input
  1853.                          window border.
  1854.  
  1855.        Example:
  1856.  
  1857.           {input upfile,Enter a filename:}        Input a string to the
  1858.                                                   variable "upfile."
  1859.  
  1860.        If 0 data characters are entered, the variable will be set to null.
  1861.  
  1862.        NOTE:  If Esc is pressed, macro processing will be terminated unless
  1863.        an exit label has been defined with SETEsc.
  1864.  
  1865.  
  1866.  
  1867.                    {COMMO} (tm)  Macro Programming Guide            page 30
  1868.  
  1869.  
  1870.        INSTring
  1871.        --------
  1872.        Default key: none
  1873.        Description: Find a string within a string, return its position.
  1874.  
  1875.        General form:
  1876.  
  1877.           {INSTring name,string}
  1878.  
  1879.                name      The name of a variable (string to search in).
  1880.                string    The string to search for.
  1881.  
  1882.        Example:
  1883.  
  1884.           {inst line,abc}     The variable "line" is searched for the
  1885.                               string "abc".
  1886.  
  1887.        INSTring will set the following:
  1888.  
  1889.           1)   The Condition Flag will be set to "true" if the string is
  1890.                found, to "false" if the string is not found.  Test with
  1891.                IFCOndition, no switches.
  1892.  
  1893.           2)   The starting position of the string will be returned in the
  1894.                built-in variable "_pos" (first character is "1").  "_pos"
  1895.                will be set to zero if the string is not found.
  1896.  
  1897.        NOTE:  INSTring does not work with built-in variables such as "_dat"
  1898.        (and will result in a macro error).
  1899.  
  1900.  
  1901.        LENGth
  1902.        ------
  1903.        Default key: none
  1904.        Description: Determine the length of a string.
  1905.  
  1906.        Examples:
  1907.  
  1908.           {leng %line}             Find the length of the string in the
  1909.                                    variable "line".
  1910.  
  1911.           {leng %line1%%line2}     Find the combined length of "line1" and
  1912.                                    "line2".
  1913.  
  1914.        The length will be returned in the built-in variable "_len".  If the
  1915.        string is null, the length will be set to zero.
  1916.  
  1917.  
  1918.        LIGHts
  1919.        ------
  1920.        Default key: Alt-0
  1921.        Description: Set Signal Lights toggle.
  1922.  
  1923.  
  1924.  
  1925.                    {COMMO} (tm)  Macro Programming Guide            page 31
  1926.  
  1927.  
  1928.  
  1929.        Examples:
  1930.  
  1931.           {lights}            Toggle Signal Lights on/off.
  1932.           {lights y}          Turn on Signal Lights.
  1933.           {lights n}          Turn off Signal Lights.
  1934.  
  1935.  
  1936.        LOCAlecho
  1937.        ---------
  1938.        Default key: none
  1939.        Description: Set Local Echo toggle.
  1940.  
  1941.        Examples:
  1942.  
  1943.           {local}             Toggle Local Echo on/off.
  1944.           {local y}           Turn on Local Echo.
  1945.           {local n}           Turn off Local Echo.
  1946.  
  1947.  
  1948.        LOOKfor
  1949.        -------
  1950.        Default key: none
  1951.        Description: Look for a string in the modem input stream.
  1952.  
  1953.        Examples:
  1954.  
  1955.           {setlook 60,abc,4,n|}    Set parameters.
  1956.           {lookfor first name?}    Look for the string "first name?"
  1957.           {look ^(COMMO^)}         Look for the string "{COMMO}".
  1958.  
  1959.  
  1960.        Parameters controlling LOOKfor execution are set with the SETLook
  1961.        function, which should be executed before any LOOKfor functions. 
  1962.        See the description of the SETLook function for details.
  1963.  
  1964.        The LOOKfor function will scan for the requested string to appear,
  1965.        then macro execution will continue with the next function.
  1966.  
  1967.        Use the GOLOok function to scan simultaneously for up to 15
  1968.        additional strings during a LOOKfor.
  1969.  
  1970.        TIPS on creating LOOKfor (and GOLOok) strings:
  1971.  
  1972.        >  There should be just one space following the LOOKfor function
  1973.           name.  Any spaces beyond this point are part of the string.  The
  1974.           string ends at the right curly brace.
  1975.  
  1976.        >  GOLOok and Auto Receive strings begin after the comma following
  1977.           the macro label.  There should be no spaces unless they are part
  1978.           of the string.
  1979.  
  1980.  
  1981.  
  1982.                    {COMMO} (tm)  Macro Programming Guide            page 32
  1983.  
  1984.  
  1985.        >  Strings may be up to 32 characters in length (control characters
  1986.           like "^M" count as one).  Upper/lower case is ignored.
  1987.  
  1988.        >  ANSI control sequences are filtered if ANSI or VT102 emulation is
  1989.           enabled.
  1990.  
  1991.        >  Remember that short strings may not be unique enough, long
  1992.           strings may not match due to line noise.
  1993.  
  1994.        >  Rules for representing special characters in LOOKfor strings are
  1995.           given in Appendix D "ASCII Character Representation."
  1996.  
  1997.        See also: GOLOok, SETLook.
  1998.  
  1999.  
  2000.        MACLoad
  2001.        -------
  2002.        Default key: none
  2003.        Description: Load a new Macro File.
  2004.  
  2005.        Switches:
  2006.  
  2007.                R1 or R   Specifies that COMMO.MAC will be reloaded when
  2008.                          carrier detect is lost.  Normally this would occur
  2009.                          at the end of the call.
  2010.  
  2011.                R0        Do not reload COMMO.MAC when carrier is lost
  2012.                          (default).
  2013.  
  2014.        General form:
  2015.  
  2016.           {MACLoad filename,label}
  2017.  
  2018.                filename       The new Macro File.  Do NOT specify a path;
  2019.                               the {COMMO} home directory will be used.
  2020.  
  2021.                label          A label to GOTO when the new file is loaded. 
  2022.                               Optional.
  2023.  
  2024.        Examples:
  2025.  
  2026.           {macload-R vt102-1.mac}       Load vt102-1.mac, reload COMMO.MAC
  2027.                                         at the end of the call.
  2028.  
  2029.           {macl newmac.fil,abc}         Load newmac.fil, start macro "abc"
  2030.                                         in the new file.
  2031.  
  2032.  
  2033.        IMPORTANT!  The new Macro File must reside in the {COMMO} home
  2034.        directory (do not specify a path).
  2035.  
  2036.  
  2037.  
  2038.                    {COMMO} (tm)  Macro Programming Guide            page 33
  2039.  
  2040.  
  2041.        The current file will be saved to disk if changes are outstanding. 
  2042.        The new file is then loaded in place of the current one (all macros
  2043.        are replaced).  
  2044.  
  2045.        MACLoad should be the last function in a macro, since control is not
  2046.        returned.
  2047.  
  2048.  
  2049.        MACRo
  2050.        -----
  2051.        Default key: Alt-M
  2052.        Description: Open Macro Processor window.
  2053.  
  2054.        Examples:
  2055.  
  2056.           {macro}             Open window at current position.
  2057.           {macro menu1}       Open window at "menu1."
  2058.  
  2059.        NOTE:  The MACRo function always terminates the currently executing
  2060.        macro.
  2061.  
  2062.        A string argument may be included to facilitate the creation of
  2063.        menus within the Macro File.  The first occurrence of the argument
  2064.        string will become the top line of the display when the window is
  2065.        opened.
  2066.  
  2067.        The Selector Bar will be positioned on the first screen line that
  2068.        has a left curly brace, if any.
  2069.  
  2070.        Here is an example of how to structure a menu using MACRo:
  2071.  
  2072.  
  2073.                                              | (this is past col. 80)
  2074.                                              | menu111
  2075.                     Name of Menu             |
  2076.                                              |
  2077.                                              |
  2078.                     Selection 1              | {exec ... } {}
  2079.                     Selection 2              | {exec ... } {}
  2080.                     Selection 3              | {exec ... } {}
  2081.                                              | {:af1} {macro menu111}
  2082.  
  2083.  
  2084.        The upper line with "menu111" will be the top line of the screen. 
  2085.        Pressing Alt-F1 will bring up the menu with the Selector Bar on
  2086.        Selection 1.
  2087.  
  2088.        Remember that the function itself will be found in the search since
  2089.        it contains the string.
  2090.  
  2091.  
  2092.  
  2093.                    {COMMO} (tm)  Macro Programming Guide            page 34
  2094.  
  2095.  
  2096.        MARK
  2097.        ----
  2098.        Default key: none
  2099.        Description: Mark Dialing Directory entries for dialing.
  2100.  
  2101.        Example:
  2102.  
  2103.           {mark joes-bbs,file-city}     Mark entries for dialing.
  2104.  
  2105.        Dialing Strings may be separated by spaces or commas.
  2106.  
  2107.        {COMMO} will search the Dialing Directory for each string and mark
  2108.        the first entry where a match is found.  Case is ignored.
  2109.  
  2110.        The strings may consist of any part of a Dialing Directory entry
  2111.        line (including passwords).  However the following characters may
  2112.        not appear in a macro Dialing String: space, comma, left or right
  2113.        curly brace. 
  2114.  
  2115.        See also: DIAL, UNMArk.
  2116.  
  2117.  
  2118.        NOOP
  2119.        ----
  2120.        Default key: none
  2121.        Description: No-op function, does nothing
  2122.  
  2123.        Example:
  2124.  
  2125.           {noop}              No arguments.
  2126.  
  2127.  
  2128.        PARMs
  2129.        -----
  2130.        Default key: Alt-P
  2131.        Description: Set Current Terminal Parameters
  2132.  
  2133.        General form:
  2134.  
  2135.           {PARMs speed,format,comport,terminal-type,delay}
  2136.  
  2137.                speed          The bps rate: 2400, 9600, etc.
  2138.                format         The data format: 8n1, 7e1, etc.
  2139.                comport        The serial port number: 1, 2, 3 or 4.
  2140.                terminal       The terminal-type: A, V or T.
  2141.                delay          The inter-character delay factor: 0-999.
  2142.  
  2143.        Examples:
  2144.  
  2145.           {parms 2400,8,1,,20}     Set 2400 bps, 8n1, Com1, delay = 20.
  2146.  
  2147.           {parms ,,4,V}            Set Com4 VT102.
  2148.  
  2149.  
  2150.  
  2151.                    {COMMO} (tm)  Macro Programming Guide            page 35
  2152.  
  2153.  
  2154.  
  2155.           {parms 19200,7o1}        Set 19200 bps, 7o1.
  2156.  
  2157.        Note that omitted parameters are not changed.
  2158.  
  2159.        See also DPARms.
  2160.  
  2161.  
  2162.        PASSword
  2163.        --------
  2164.        Default key: Alt-W
  2165.        Description: Send current password.
  2166.  
  2167.        Example:
  2168.  
  2169.           {password}          No arguments.
  2170.  
  2171.        The current password is obtained from the Dialing Directory entry
  2172.        whenever a number is dialed.  If no password is specified no
  2173.        characters will be sent.
  2174.  
  2175.  
  2176.        PAUSe
  2177.        -----
  2178.        Default key: none
  2179.        Description: Pause for up to 999 seconds.
  2180.  
  2181.        Example:
  2182.  
  2183.           {pause 25}          Pause for 25 seconds.
  2184.  
  2185.        NOTE:  Incoming characters displayed during a PAUSe function are not
  2186.        seen by subsequent GOLOok/LOOKfor functions.
  2187.  
  2188.  
  2189.        POPStack
  2190.        --------
  2191.        Default key: none
  2192.        Description: Pop an element from the macro stack.
  2193.  
  2194.        Example:
  2195.  
  2196.           {pops}              No arguments.
  2197.  
  2198.        POPStack throws away the top element on the macro stack.  This
  2199.        element would have been the target of the next RETUrn function.
  2200.  
  2201.        See PUSHstack for a more complete description of the use of this
  2202.        function.
  2203.  
  2204.        See also CALL, RETUrn, GOLOok, LOOKfor.
  2205.  
  2206.  
  2207.  
  2208.                    {COMMO} (tm)  Macro Programming Guide            page 36
  2209.  
  2210.  
  2211.  
  2212.        PRINtlog
  2213.        --------
  2214.        Default key: Alt-2
  2215.        Description: Set Print Log toggle.
  2216.  
  2217.        Examples:
  2218.  
  2219.           {print}             Toggle Print Log on/off.
  2220.           {print y}           Turn on Print Log.
  2221.           {print n}           Turn off Print Log.
  2222.  
  2223.  
  2224.        PUSHstack
  2225.        ---------
  2226.        Default key: none
  2227.        Description: Push a return point onto the macro stack.
  2228.  
  2229.        Examples:
  2230.  
  2231.           {push}              Push the current location.
  2232.           {push abc}          Push the location "abc".
  2233.  
  2234.        When there are no arguments, the location pushed is the location of
  2235.        the PUSHstack function itself (i.e., it will be executed again when
  2236.        a RETUrn is encountered).
  2237.  
  2238.        Explanation:  Whenever a CALL is executed, the location of the
  2239.        function following the CALL (the "return point") is "pushed" onto
  2240.        the macro stack.  When a subsequent RETUrn is executed, the location
  2241.        at the top of the stack is "popped" and control is transferred to
  2242.        that location.  This allows "nesting" of CALLs and RETUrns.
  2243.  
  2244.        PUSHstack will push a return point onto the macro stack without
  2245.        transferring control to the location (control continues in
  2246.        sequence).  A subsequent RETUrn will transfer control to the
  2247.        location that was pushed.
  2248.  
  2249.        POPStack will remove the top stack element without transferring
  2250.        control to it (control continues in sequence).
  2251.  
  2252.        These functions may be used to set a return point for GOLOok/LOOKfor
  2253.        functions, so that the same GOLOok routines may be used in more than
  2254.        one macro.  They also help to create macros with improved structure.
  2255.  
  2256.        Here is a sample construct using PUSHstack and POPStack:
  2257.  
  2258.           {:mmm} {call ggg} ...
  2259.            ...
  2260.           {:ggg} ...
  2261.                 {pushstack}
  2262.                 {golook aaa,string1}
  2263.  
  2264.  
  2265.  
  2266.                    {COMMO} (tm)  Macro Programming Guide            page 37
  2267.  
  2268.  
  2269.                 {golook bbb,string2}
  2270.                 {golook ccc,string3}
  2271.                 {lookfor string4} {send answer4}
  2272.                 {popstack} {return}
  2273.  
  2274.           {:aaa} {send answer1} {return}
  2275.           {:bbb} {send answer2} {return}
  2276.           {:ccc} {send answer3} {return}
  2277.  
  2278.        If strings 1,2 or 3 come in, responses will be sent and control will
  2279.        RETUrn to the PUSHstack (and execute it again).  If string 4 comes
  2280.        in the element pushed will be discarded by the POPStack and control
  2281.        will return following the {call ggg}.
  2282.  
  2283.        See also CALL, RETUrn, GOLOok, LOOKfor.
  2284.  
  2285.  
  2286.        RCLOse
  2287.        ------
  2288.        Default key: none
  2289.        Description: Close the read file.
  2290.  
  2291.        Example:
  2292.  
  2293.           {rclose}            No arguments.
  2294.  
  2295.        IMPORTANT:  The read file will be closed automatically in the
  2296.        following situations:
  2297.  
  2298.           1)   When an attempt is made to read past the end of the file.
  2299.           2)   When the macro terminates (STOP, EXIT, etc.).
  2300.  
  2301.        A macro error will result if you try to close and no file is open.
  2302.  
  2303.        See also ROPEn, READ.
  2304.  
  2305.  
  2306.        READ
  2307.        ----
  2308.        Default key: none
  2309.        Description: Read a line from the read file to a variable.
  2310.  
  2311.        Example:
  2312.  
  2313.           {read nextline}          Read the next line in the file into the
  2314.                                    variable "nextline."
  2315.  
  2316.        TIPS on reading files:
  2317.  
  2318.        >  Each READ will get another line until the end of the file is
  2319.           encountered, at which time control will GOTO the label specified
  2320.           when the file was opened.  If no label was specified (or the
  2321.  
  2322.  
  2323.  
  2324.                    {COMMO} (tm)  Macro Programming Guide            page 38
  2325.  
  2326.  
  2327.           label is invalid) control continues in sequence.  In either case
  2328.           the file will be closed.
  2329.  
  2330.        >  ALL control characters (below ASCII 28) will be discarded,
  2331.           including the carriage return/linefeed that terminates the line.
  2332.  
  2333.        >  A file must be open for reading or a macro error will result.
  2334.  
  2335.        See also ROPEn, RCLOse
  2336.  
  2337.  
  2338.        RETUrn
  2339.        ------
  2340.        Default key: none
  2341.        Description: Return from a CALLed macro.
  2342.  
  2343.        Example:
  2344.  
  2345.           {return}            No arguments.
  2346.  
  2347.        This function will return control to a location determined by the
  2348.        last CALL or PUSHstack function.  See PUSHstack for a more complete
  2349.        description of the use of CALL/RETUrn.
  2350.  
  2351.        NOTE:  If a RETUrn is encountered and no CALL or PUSHstack has been
  2352.        executed, a STOP will occur.  This is useful in macros that are
  2353.        CALLed and are also used standalone (such as protocol file transfer
  2354.        macros).
  2355.  
  2356.        See also CALL, PUSHstack, POPStack.
  2357.  
  2358.  
  2359.        ROPEn
  2360.        -----
  2361.        Default key: none
  2362.        Description: Open a file for reading.
  2363.  
  2364.        General Form:
  2365.  
  2366.           {ROPEn name,label}
  2367.  
  2368.                name      The name of a string variable.
  2369.  
  2370.                label     A label to GOTO when a READ is attempted at the
  2371.                          end of the file.
  2372.  
  2373.        Example:
  2374.  
  2375.           {ropen c:\bbs\file.txt,nomore}     Open the file and set the
  2376.                                              label "nomore" to GOTO when
  2377.                                              the end of the file is
  2378.                                              reached.
  2379.  
  2380.  
  2381.  
  2382.                    {COMMO} (tm)  Macro Programming Guide            page 39
  2383.  
  2384.  
  2385.  
  2386.        TIPS on using ROPEn:
  2387.  
  2388.        >  Only one file may be opened for reading (and one for writing).
  2389.  
  2390.        >  The file will be automatically closed when the end of the file is
  2391.           encountered during a READ (whether or not a label is specified). 
  2392.           An RCLOse is not needed in this situation and will cause a macro
  2393.           error.
  2394.  
  2395.        See also READ, RCLOse.
  2396.  
  2397.  
  2398.        RXMOdem
  2399.        -------
  2400.        Default key: none
  2401.        Description: Receive a file using Xmodem.
  2402.  
  2403.        Switches:
  2404.  
  2405.                C1 or C   Use CRC error correction (default).
  2406.                C0        Use Checksum error correction.
  2407.                D1 or D   Cancel transfer if carrier detect is lost
  2408.                          (default).
  2409.                D0        Ignore state of carrier detect.
  2410.                A1 or A   Sound the alarm at end of transfer.
  2411.                A0        Do not sound the alarm (default).
  2412.                W1 or W   Wait for a keypress at end of transfer.
  2413.                W0        Do not wait for a keypress (default).
  2414.  
  2415.        Example:
  2416.  
  2417.           {rxmo-a c:\dl\file.zip}            Receive "file.zip", sound the
  2418.                                              alarm.
  2419.  
  2420.        TIPS on using RXMOdem:
  2421.  
  2422.        >  IMPORTANT:  If the file already exists it will be overwritten
  2423.           without warning.  The IFEXist function may be used to prevent
  2424.           this if desired.
  2425.  
  2426.        >  Block size is established by the sender and may be changed on a
  2427.           block-by-block basis.
  2428.  
  2429.        >  The transfer will be cancelled after 10 consecutive errors, if
  2430.           the sender cancels or if you press Esc.
  2431.  
  2432.        >  The Exit Code (test with IFER) will be set at the end of the
  2433.           transfer.  The error code will also be stored in the variable
  2434.           "_err".  0 means success, 1 means failure.
  2435.  
  2436.  
  2437.  
  2438.                    {COMMO} (tm)  Macro Programming Guide            page 40
  2439.  
  2440.  
  2441.        >  If the Usage Log is enabled, an entry will be made at the end of
  2442.           each transfer.
  2443.  
  2444.        See also SXMOdem.
  2445.  
  2446.  
  2447.        SCREen
  2448.        ------
  2449.        Default key: Alt-I
  2450.        Description: Screen Image Save.
  2451.  
  2452.        Examples:
  2453.  
  2454.           {screen}                 Open Screen Image Save window.
  2455.           {screen y}               Append screen image to current file.
  2456.           {screen y,commo.scr}     Append screen image to indicated file.
  2457.                                    (and change current pathname).
  2458.           {screen n,c:\file.xyz}   Change current screen image pathname
  2459.                                    (don't save screen to file).
  2460.  
  2461.  
  2462.        SCROllback
  2463.        ----------
  2464.        Default key: Alt-K
  2465.        Description: Display Scrollback Buffer
  2466.  
  2467.        Example:
  2468.  
  2469.           {scroll}            No arguments.
  2470.  
  2471.  
  2472.        SEND
  2473.        ----
  2474.        Default key: none
  2475.        Description: Send a string to the modem (serial port).
  2476.  
  2477.        Examples:
  2478.  
  2479.           {send Fred|~~Brucker|~~%_pass%|}
  2480.  
  2481.                               Send my first and last name with carriage
  2482.                               returns and 1 second delays, then send the
  2483.                               current password and a <cr>.
  2484.  
  2485.           {send ^[^[}         Send two <esc> characters.
  2486.  
  2487.           {send  }            Send a space (there must be two spaces, the
  2488.                               first is the separator).
  2489.  
  2490.           {send %line}        Send the string in the variable "line".
  2491.  
  2492.  
  2493.  
  2494.                    {COMMO} (tm)  Macro Programming Guide            page 41
  2495.  
  2496.  
  2497.        NOTE:  See Appendix D "ASCII Character Representation" for
  2498.        information on how to represent any character in a SEND function.
  2499.  
  2500.  
  2501.        SETEsc
  2502.        ------
  2503.        Default key: none
  2504.        Description: Define a label to GOTO when Esc is pressed.
  2505.  
  2506.        Example:
  2507.  
  2508.           {setesc finish}          GOTO "finish" when Esc is pressed.
  2509.  
  2510.        This function is used to "capture" the Esc key during macro
  2511.        execution, especially when a MACLoad is used to load a new Macro
  2512.        File.  It will help prevent undesired macro terminations.
  2513.  
  2514.        After SETEsc is executed, {COMMO} will query the user whenever Esc
  2515.        is pressed with "A macro is running.  Terminate it?."  If the user
  2516.        answers "no," macro processing will continue as if nothing had
  2517.        happened.  If "yes," processing will GOTO the label.
  2518.  
  2519.        The macro at the label would typically reload COMMO.MAC, thus
  2520.        restoring the user's familiar environment.
  2521.  
  2522.        NOTE:  In the various command windows, Esc is normally used to exit
  2523.        the window.  Use Ctrl-Break to bring up the prompt.
  2524.  
  2525.  
  2526.        SETGet
  2527.        -------
  2528.        Default key: none
  2529.        Description: Set parameters for GETString functions.
  2530.  
  2531.        General form:
  2532.  
  2533.           {SETGet seconds,label,y/n/l,string}
  2534.  
  2535.                seconds   GETString timeout.  If a character is not entered
  2536.                          in the specified amount of time, the macro in the
  2537.                          second argument will be started.  May be 0 to 999. 
  2538.                          Default is 0 (disabled).
  2539.  
  2540.                label     Timeout macro.  Macro to GOTO if the time in the
  2541.                          first argument expires.  If no macro is specified
  2542.                          or if the macro label is invalid, control will
  2543.                          pass to the function following the GETString. 
  2544.                          Default is no macro.
  2545.  
  2546.                          Note that if the timer expires no variable
  2547.                          assignment will be made.  Any previous assignment
  2548.                          will be unaltered.
  2549.  
  2550.  
  2551.  
  2552.                    {COMMO} (tm)  Macro Programming Guide            page 42
  2553.  
  2554.  
  2555.  
  2556.                y/n/l     Echo Status.  If this is "yes", characters entered
  2557.                          at the local or remote terminals will be echoed
  2558.                          back to the remote and displayed locally.  This is
  2559.                          the default.
  2560.  
  2561.                          If "no", characters will not be echoed to either
  2562.                          location.  This may be used where security is
  2563.                          desired -- such as for password input.
  2564.  
  2565.                          If "local", characters will be displayed locally,
  2566.                          but not echoed to the remote.  This should be used
  2567.                          when the remote is a host system.
  2568.  
  2569.                          IMPORTANT:  This setting is independent of Local
  2570.                          Echo.  Turn on Local Echo if necessary for local
  2571.                          display of data sent with SEND, ASCIiup, etc.
  2572.  
  2573.                string    Terminator response.  This string will be sent
  2574.                          and/or displayed locally (in accord with the Echo
  2575.                          Status) when a carriage return is received (input
  2576.                          terminated).  This is typically a carriage
  2577.                          return/linefeed.  May be up to 32 characters. 
  2578.                          Default is no string.
  2579.  
  2580.        Example:
  2581.  
  2582.           {setg 120,noget,y,^m^j}       Set GETString parameters.
  2583.  
  2584.  
  2585.        The SETGet function will set parameters for all subsequent GETString
  2586.        functions.  It may be executed at any time to modify the parameters. 
  2587.  
  2588.        When macro processing terminates, the parameters will be reset to
  2589.        the default values.
  2590.  
  2591.        Default arguments are:      GETString timeout        0 (disabled)
  2592.                                    Timeout macro            none 
  2593.                                    Echo status              y (echo on)
  2594.                                    Terminator response      none
  2595.  
  2596.        IMPORTANT:  Null arguments in the SETGet function will be set to
  2597.        these defaults.
  2598.  
  2599.        See also: GETString.
  2600.  
  2601.  
  2602.        SETLook
  2603.        -------
  2604.        Default key: none
  2605.        Description: Set parameters for LOOKfor functions.
  2606.  
  2607.  
  2608.  
  2609.                    {COMMO} (tm)  Macro Programming Guide            page 43
  2610.  
  2611.  
  2612.        General form:
  2613.  
  2614.           {SETLook seconds,label,seconds,string}
  2615.  
  2616.                seconds   LOOKfor timeout.  Maximum time in seconds to look
  2617.                          for a string.  If the string is not found in the
  2618.                          allotted time, the macro in the second argument
  2619.                          will be started.  May be 0 to 999.  Default is 0
  2620.                          (disabled).  
  2621.  
  2622.                label     Timeout macro.  Macro to GOTO if the time in the
  2623.                          first argument expires.  If no macro is specified
  2624.                          or if the macro label is invalid, control will
  2625.                          pass to the function following the LOOKfor.
  2626.  
  2627.                seconds   Prompt timeout.  During a LOOKfor function
  2628.                          unwanted prompts may appear like "Press any key"
  2629.                          or "More [Y/n]", etc.  This argument is the time
  2630.                          in seconds to wait at a prompt (no input from the
  2631.                          modem) before sending the string in the fourth
  2632.                          argument.  Usually you would send "|" or "n|".
  2633.  
  2634.                          When the response string is sent the timer is
  2635.                          restarted, allowing any number of prompts to be
  2636.                          satisfied (until the LOOKfor itself is satisfied
  2637.                          or times out).
  2638.  
  2639.                          The timer will also be restarted if any keys are
  2640.                          typed while waiting.  This allows a manual
  2641.                          response to a prompt which the macro does not
  2642.                          handle.
  2643.  
  2644.                          IMPORTANT:  The prompt timeout should be long
  2645.                          enough (or disabled entirely) to prevent the
  2646.                          response from being sent when there is a long
  2647.                          delay without a prompt.  This might occur right
  2648.                          after connection while the BBS software is loading
  2649.                          or when a "door" program is loading.
  2650.  
  2651.                          Failure to heed this warning will result in "n"
  2652.                          responses to "First name?" and other undesirable
  2653.                          effects.
  2654.  
  2655.                          May be 0 to 999.  Default is 0 (disabled).
  2656.  
  2657.                string    Prompt response.  String to send when the time in
  2658.                          the third argument runs out.  May be up to 32
  2659.                          characters.  Default is no string.
  2660.  
  2661.        Example:
  2662.  
  2663.           {setl 60,abc,4,n|}       Set LOOKfor parameters
  2664.  
  2665.  
  2666.  
  2667.                    {COMMO} (tm)  Macro Programming Guide            page 44
  2668.  
  2669.  
  2670.  
  2671.  
  2672.        The SETLook function will set parameters for all subsequent LOOKfor
  2673.        functions.  It may be executed at any time to modify the parameters. 
  2674.  
  2675.        When macro processing terminates, the parameters will be reset to
  2676.        the default values.
  2677.  
  2678.        Default arguments are:      LOOKfor timeout     0 (disabled)
  2679.                                    Timeout macro       none 
  2680.                                    Prompt timeout      0 (disabled)
  2681.                                    Prompt response     none
  2682.  
  2683.        IMPORTANT:  Null arguments in the SETLook function will revert to
  2684.        these defaults.
  2685.  
  2686.        See also: LOOKfor, GOLOok.
  2687.  
  2688.  
  2689.        SETVariable
  2690.        -----------
  2691.        Default key: none
  2692.        Description: Assign a string to a variable name.
  2693.  
  2694.        General form:
  2695.  
  2696.           {SETVariable name,string}
  2697.  
  2698.        Switches:
  2699.  
  2700.                S1 or S   Signifies that the second argument is a variable
  2701.                          name containing a "subscript" and must be expanded
  2702.                          twice.  Do NOT use a "%" in front of the variable
  2703.                          name.  See example below.
  2704.  
  2705.                S0        Single expansion (default).
  2706.  
  2707.        Examples:
  2708.  
  2709.           {setv nodeid,DIRASNT}         Assign the string "DIRASNT" to the
  2710.                                         variable name "nodeid."
  2711.  
  2712.           {setv-s xxx,yyy%index}        Suppose the variable "index" has
  2713.                                         the value "3".  It will be expanded
  2714.                                         first, then "yyy3" will be expanded
  2715.                                         and its value assigned to "xxx".
  2716.  
  2717.  
  2718.        SHELl
  2719.        -----
  2720.        Default key: Alt-S
  2721.        Description: Shell to DOS.
  2722.  
  2723.  
  2724.  
  2725.                    {COMMO} (tm)  Macro Programming Guide            page 45
  2726.  
  2727.  
  2728.  
  2729.        Example:
  2730.  
  2731.           {shell}             No arguments.
  2732.  
  2733.  
  2734.        SFLOw
  2735.        -----
  2736.        Default key: none
  2737.        Description: Set Software Flow Control toggle.
  2738.  
  2739.        Examples:
  2740.  
  2741.           {sflow}             Toggle Software Flow Control on/off.
  2742.           {sflow y}           Turn on Software Flow Control.
  2743.           {sflow n}           Turn off Software Flow Control.
  2744.  
  2745.  
  2746.        SOUNd
  2747.        -----
  2748.        Default key: none
  2749.        Description: Set Master Sound toggle.
  2750.  
  2751.        Examples:
  2752.  
  2753.           {sound}             Toggle Master Sound on/off.
  2754.           {sound y}           Turn on Master Sound.
  2755.           {sound n}           Turn off Master Sound.
  2756.  
  2757.  
  2758.        SPOCtrl
  2759.        -------
  2760.        Default key: none
  2761.        Description: Serial port output control.
  2762.  
  2763.        Examples:
  2764.  
  2765.           {spoc y}            Serial port output is ON.
  2766.           {spoc n}            Serial port output is OFF.
  2767.  
  2768.        This function will inhibit any data from being sent to the serial
  2769.        port.  All other program operations will be normal.  It is used for
  2770.        "local mode" in host macros (no data is sent to the modem).
  2771.  
  2772.        Serial port output will always be restored to ON at macro
  2773.        termination.
  2774.  
  2775.  
  2776.        STATusline
  2777.        ----------
  2778.        Default key: none
  2779.        Description: Set Status Line toggle.
  2780.  
  2781.  
  2782.  
  2783.                    {COMMO} (tm)  Macro Programming Guide            page 46
  2784.  
  2785.  
  2786.  
  2787.        IMPORTANT!  The Status Line is {COMMO}'s instrument panel.  You
  2788.        should not turn it off until you are familiar with operating the
  2789.        program.
  2790.  
  2791.        Examples:
  2792.  
  2793.           {statusline}        Toggle Status Line on/off.
  2794.           {status y}          Turn on Status Line.
  2795.           {status n}          Turn off Status Line.
  2796.  
  2797.        When the Status Line is off (not visible), the bottom line of the
  2798.        display becomes part of the Terminal Screen.
  2799.  
  2800.        The STATusline function is ignored while in Chat Mode.
  2801.  
  2802.  
  2803.        STOP
  2804.        ----
  2805.        Default key: none
  2806.        Description: Halt macro execution.
  2807.  
  2808.        Examples:
  2809.  
  2810.           {stop}              No arguments.
  2811.           {}                  Short form.
  2812.  
  2813.        STOP always returns {COMMO} to manual operation in the Terminal
  2814.        Screen.  It should be used to end login macros.
  2815.  
  2816.  
  2817.        SUBString
  2818.        ---------
  2819.        Default key: none
  2820.        Description: Move a substring to a variable.
  2821.  
  2822.        General form:
  2823.  
  2824.           {SUBString name,start,count,string}
  2825.  
  2826.                name      The name of the variable to which the substring
  2827.                          will be assigned.
  2828.  
  2829.                start     The starting character number (first character is
  2830.                          "1").  If it is negative, {COMMO} will count in
  2831.                          from the end of the string.
  2832.  
  2833.                          If it is too large and positive, the substring
  2834.                          will be null.
  2835.  
  2836.                          If it is too large and negative, the substring
  2837.                          will start at the beginning of the string.
  2838.  
  2839.  
  2840.  
  2841.                    {COMMO} (tm)  Macro Programming Guide            page 47
  2842.  
  2843.  
  2844.  
  2845.                count     The number of characters to use.  If the number is
  2846.                          too large, {COMMO} will use as many as possible. 
  2847.                          If the count is 0, the substring will be null.
  2848.  
  2849.                string    The string to use.
  2850.  
  2851.        Examples:
  2852.  
  2853.           {subs var-sub,2,4,abcdefgh}        Set "var-sub" to "bcde".
  2854.           {subs newvar,-5,20,abcdefgh}       Set "newvar" to "defgh".
  2855.  
  2856.  
  2857.        SXMOdem
  2858.        -------
  2859.        Default key: none
  2860.        Description: Send a file using Xmodem.
  2861.  
  2862.        Switches:
  2863.  
  2864.                K1 or K   Use 1024 byte block size (Xmodem-1k).
  2865.                K0        Use 128 byte block size (default).
  2866.                D1 or D   Cancel transfer if carrier detect is lost
  2867.                          (default).
  2868.                D0        Ignore state of carrier detect.
  2869.                A1 or A   Sound the alarm at end of transfer.
  2870.                A0        Do not sound the alarm (default).
  2871.                W1 or W   Wait for a keypress at end of transfer.
  2872.                W0        Do not wait for a keypress (default).
  2873.  
  2874.        Example:
  2875.  
  2876.           {sxmo-ka c:\ul\file.zip}           Send "file.zip" using 1024
  2877.                                              byte block size, sound the
  2878.                                              alarm.
  2879.  
  2880.        TIPS on using SXMOdem:
  2881.  
  2882.        >  The transfer will be cancelled after 10 consecutive errors, if
  2883.           the receiver cancels or if you press Esc.
  2884.  
  2885.        >  CRC vs. Checksum mode is established by the receiver.
  2886.  
  2887.        >  The Exit Code (test with IFER) will be set at the end of the
  2888.           transfer.  The error code will also be stored in the variable
  2889.           "_err".  0 means success, 1 means failure.
  2890.  
  2891.        >  If the Usage Log is enabled, an entry will be made at the end of
  2892.           each transfer.
  2893.  
  2894.        See also RXMOdem.
  2895.  
  2896.  
  2897.  
  2898.                    {COMMO} (tm)  Macro Programming Guide            page 48
  2899.  
  2900.  
  2901.  
  2902.        TOGGles
  2903.        -------
  2904.        Default key: Alt-T
  2905.        Description: Set various toggle parameters.
  2906.  
  2907.        Example:
  2908.  
  2909.           {toggles}                Open Set Toggles window.
  2910.  
  2911.  
  2912.        UNMArk
  2913.        ------
  2914.        Default key: none
  2915.        Description: Unmark Dialing Directory entries.
  2916.  
  2917.        Example:
  2918.  
  2919.           {unmark joes-bbs,file-city}        Unmark listed entries.
  2920.           {unmark}                           Unmark all entries.
  2921.  
  2922.        See the description of the MARK function for the rules on writing
  2923.        macro Dialing Strings.
  2924.  
  2925.        See also: DIAL, MARK.
  2926.  
  2927.  
  2928.        VTCUr
  2929.        -----
  2930.        Default key: none
  2931.        Description: Define a VT102 cursor (arrow) key.
  2932.  
  2933.        Example:
  2934.  
  2935.           {vtcur ^[[A|^[OA}        Define up-arrow key strings.
  2936.  
  2937.        The first string is sent when cursor mode is active; the second
  2938.        string is sent when application mode is active (these modes are
  2939.        controlled by the host).
  2940.  
  2941.        The two strings must be separated by a "|".  Use "^m" for carriage
  2942.        return if necessary.
  2943.  
  2944.        See also VTPAd.
  2945.  
  2946.  
  2947.        VTPAd
  2948.        -----
  2949.        Default key: none
  2950.        Description: Define a VT102 keypad key.
  2951.  
  2952.        Example:
  2953.  
  2954.  
  2955.  
  2956.                    {COMMO} (tm)  Macro Programming Guide            page 49
  2957.  
  2958.  
  2959.  
  2960.           {vtpad 5|^[Ou}           Define keypad "5" key strings.
  2961.  
  2962.        The first string is sent when numeric mode is active; the second
  2963.        string is sent when application mode is active (these modes are
  2964.        controlled by the host).
  2965.  
  2966.        The two strings must be separated by a "|".  Use "^m" for carriage
  2967.        return if necessary.
  2968.  
  2969.        See also VTCUr.
  2970.  
  2971.  
  2972.        WCLOse
  2973.        ------
  2974.        Default key: none
  2975.        Description: Close the write file.
  2976.  
  2977.        Example:
  2978.  
  2979.           {wclose}            No arguments.
  2980.  
  2981.        A macro error will result if you try to close and no file is open.
  2982.  
  2983.        See also WOPEn, WRITE.
  2984.  
  2985.  
  2986.        WOPEn
  2987.        -----
  2988.        Default key: none
  2989.        Description: Open a file for writing.
  2990.  
  2991.        Switches:
  2992.  
  2993.                A1 or A   Open the file in "append" mode.  New lines written
  2994.                          to the file will be added at the end.  If the file
  2995.                          doesn't exist, it will be created.
  2996.  
  2997.                A0        Open the file in "create" mode.  If the file
  2998.                          exists, it will be erased (default).
  2999.  
  3000.        Examples:
  3001.  
  3002.           {wopen c:\bbs\file.txt}       Open the file in create mode.
  3003.  
  3004.           {wopen-a c:\data\word.fil}    Open the file in append mode.
  3005.  
  3006.        TIP on using WOPEn:
  3007.  
  3008.           Only one file may be opened for writing (and one for reading).
  3009.  
  3010.        See also WRITe, WCLOse.
  3011.  
  3012.  
  3013.  
  3014.                    {COMMO} (tm)  Macro Programming Guide            page 50
  3015.  
  3016.  
  3017.  
  3018.  
  3019.        WRITE
  3020.        -----
  3021.        Default key: none
  3022.        Description: Write a string to the write file.
  3023.  
  3024.        Examples:
  3025.  
  3026.           {write %nextline}        Write the contents of the variable
  3027.                                    "nextline" to the write file.
  3028.  
  3029.           {write}                  Write a carriage return/linefeed only
  3030.                                    (blank line) to the file.
  3031.  
  3032.           {write %num%> }          Write the contents of "num" followed by
  3033.                                    a ">" and a space.
  3034.  
  3035.        TIPS on writing to files:
  3036.  
  3037.        >  A file must be open for writing or a macro error will result.
  3038.  
  3039.        >  The string will be written as one line, terminated by a carriage
  3040.           return/linefeed.
  3041.  
  3042.        >  Control character translation is not performed on the write
  3043.           string.
  3044.  
  3045.        >  A macro error will result if the disk is full.
  3046.  
  3047.        See also WOPEn, WCLOse
  3048.  
  3049.  
  3050.        ========================================
  3051.        Appendix A   Table of {COMMO} Key-labels
  3052.        ========================================
  3053.  
  3054.        Key-labels are also macro labels with the added advantage that the
  3055.        macro can be started by pressing the associated key from the
  3056.        Terminal Screen.  Most "extended" keys may be assigned this way.  If
  3057.        the same key-label appears more than once, the first occurrence will
  3058.        be used.  Note that key-labels are case insensitive.  The caret (^)
  3059.        indicates the Ctrl key.
  3060.  
  3061.        Enhanced keyboard key-labels are listed below.
  3062.  
  3063.  
  3064.  
  3065.                    {COMMO} (tm)  Macro Programming Guide            page 51
  3066.  
  3067.  
  3068.                Key Name     Key-label     Key Name     Key-label
  3069.                ________     _________     ________     _________
  3070.  
  3071.                Normal-F1     nf1   ...    Normal-F10    nf0
  3072.                Ctrl-F1       cf1   ...    Ctrl-F10      cf0
  3073.                Shift-F1      sf1   ...    Shift-F10     sf0
  3074.                Alt-F1        af1   ...    Alt-F10       af0
  3075.  
  3076.                Alt-A         ala   ...    Alt-Z         alz
  3077.                Alt-1         al1   ...    Alt-0         al0
  3078.                Alt =         al=          Alt -         al-
  3079.  
  3080.                Escape        esc          Grey *        gr*
  3081.                Grey -        gr-          Grey +        gr+
  3082.  
  3083.                Backspace     bsp          ^Backspace    cbs
  3084.                Tab           tab          Shift-tab     stb
  3085.                Enter         ent          ^Enter        cen
  3086.  
  3087.                Home          hom          End           end
  3088.                PgUp          pgu          PgDn          pgd
  3089.                Up-Arrow      upa          Down-Arrow    dna
  3090.                Left-Arrow    lfa          Right-Arrow   rta
  3091.                Insert        ins          Delete        del
  3092.  
  3093.                ^Home         chm          ^End          cnd
  3094.                ^PgUp         cpu          ^PgDn         cpd
  3095.                ^Right-Arrow  cra          ^Left-Arrow   cla
  3096.  
  3097.                Keypad-0      kp0   ...    Keypad-9      kp9
  3098.                Keypad-.      kp.          ^PrtSc        cpr
  3099.  
  3100.  
  3101.        Enhanced Keyboard Key-labels
  3102.        ============================
  3103.  
  3104.        IMPORTANT:  To use the following keys you must tell {COMMO} to test
  3105.        for the enhanced keyboard.  The item {tek=yes} must appear in your
  3106.        Setup File.
  3107.  
  3108.                Normal-F11    nfa          Normal-F12    nfb
  3109.                Ctrl-F11      cfa          Ctrl-F12      cfb
  3110.                Shift-F11     sfa          Shift-F12     sfb
  3111.                Alt-F11       afa          Alt-F12       afb
  3112.  
  3113.                Alt-[         al[          Alt-]         al]
  3114.                Alt-;         al;          Alt-'         al'
  3115.                Alt-,         al<          Alt-.         al.
  3116.                Alt-/         al/          Alt-\         al\
  3117.                Alt-*         al*          Alt-`         al`
  3118.                Center Key    cky
  3119.  
  3120.  
  3121.  
  3122.                    {COMMO} (tm)  Macro Programming Guide            page 52
  3123.  
  3124.  
  3125.        The Center Key is the Keypad 5 with Numlock off.
  3126.  
  3127.        The keys in the second group may also work with the 83-key keyboard
  3128.        if your BIOS supports the enhanced keyboard.
  3129.  
  3130.  
  3131.        ============================================
  3132.        Appendix B   Macro Functions Listed by Class
  3133.        ============================================
  3134.  
  3135.        Variable manipulation
  3136.        ---------------------
  3137.  
  3138.           SETVariable    Assign a string to a variable name
  3139.           INCRement      Increment a numeric variable
  3140.           DECRement      Decrement a numeric variable
  3141.           INSTring       Find a string within a string
  3142.           SUBString      Move a substring to a variable
  3143.           LENGth         Determine the length of a string
  3144.  
  3145.        Looking for text
  3146.        ----------------
  3147.  
  3148.           AUTO           Auto Receive
  3149.           SETLook        Set LOOKfor parameters
  3150.           GOLOok         Additional string to look for
  3151.           LOOKfor        Look for string from port
  3152.  
  3153.        File Input/Output
  3154.        -----------------
  3155.  
  3156.           ROPEn          Open a file for reading
  3157.           READ           Read from a file to a variable
  3158.           RCLOse         Close the read file
  3159.           WOPEn          Open a file for writing
  3160.           WRITe          Write to a file from a variable
  3161.           WCLOse         Close the write file
  3162.  
  3163.        Dialing/connect/disconnect
  3164.        --------------------------
  3165.  
  3166.           ABAUd          AutoBaud toggle
  3167.           DIAL           Dialing Directory
  3168.           DPARms         Set dialing default parameters
  3169.           HANGup         Drop DTR to hangup
  3170.           MARK           Mark numbers for dialing
  3171.           UNMArk         Unmark Dialing Directory entries
  3172.  
  3173.        Modem control
  3174.        -------------
  3175.  
  3176.           PARMs          Set current terminal parameters
  3177.  
  3178.  
  3179.  
  3180.                    {COMMO} (tm)  Macro Programming Guide            page 53
  3181.  
  3182.  
  3183.           LOCAlecho      Local Echo toggle
  3184.           INITmodem      Send modem init string
  3185.           HFLOW          Hardware flow control
  3186.           SFLOw          Software flow control
  3187.           BREAk          Send Break
  3188.           LIGHts         Signal Lights toggle
  3189.           SPOCtrl        Serial port output control
  3190.  
  3191.        Send/receive data
  3192.        -----------------
  3193.  
  3194.           ASCIiup        ASCII Upload
  3195.           SEND           Send a text string
  3196.           CAPMode        Set Capture Mode
  3197.           CAPTure        Capture File Options
  3198.           SETGet         Set GETString parameters
  3199.           GETString      Get a string from the modem
  3200.           RXMOdem        Receive a file using Xmodem
  3201.           SXMOdem        Send a file using Xmodem
  3202.           PASSword       Send current password
  3203.           VTCUr          VT102 cursor key strings
  3204.           VTPAd          VT102 keypad key strings
  3205.  
  3206.        Testing
  3207.        -------
  3208.  
  3209.           COMPare        Compare a variable to a string
  3210.           IFCOndition    Test conditions set by COMPare
  3211.           IFERrorlevel   Test if Exit Code   number
  3212.           IFEXist        Test for existence of file(s)
  3213.           IFCArrier      Test for presence of carrier detect
  3214.  
  3215.        Macro control
  3216.        -------------
  3217.  
  3218.           CALL           Execute a macro
  3219.           RETUrn         Return from a CALL
  3220.           PUSHstack      Push a location to the macro stack
  3221.           POPStack       Pop from the macro stack
  3222.           GOTO           Transfer control to a label
  3223.           STOP           Stop macro processing
  3224.           MACLoad        Load a new Macro File
  3225.           PAUSe          Pause for interval 1-999 second
  3226.           HOLD           Hold until specified 24 hr time
  3227.           SETEsc         Set a label to GOTO on Esc
  3228.  
  3229.        Video/sound related
  3230.        -------------------
  3231.  
  3232.           CLEAr          Clear Screen
  3233.           CURSor         Terminal Screen cursor toggle
  3234.           DISPlay        Display a string to the screen
  3235.  
  3236.  
  3237.  
  3238.                    {COMMO} (tm)  Macro Programming Guide            page 54
  3239.  
  3240.  
  3241.           SCREen         Screen Image Save
  3242.           STATusline     Status Line on/off toggle
  3243.           SOUNd          Master Sound toggle
  3244.           ALARm          Ring the alarm
  3245.           BEEP           Sound a beep
  3246.  
  3247.        Miscellaneous
  3248.        -------------
  3249.  
  3250.           CHATmode       Chat Mode toggle
  3251.           DOORway        Doorway Mode toggle
  3252.           ELAPse         Reset the elapsed timer
  3253.           EDIT           Edit a file
  3254.           EXECute        Execute a DOS command
  3255.           EXIT           Exit {COMMO}
  3256.           HELP           Online Help topic
  3257.           INPUt          Input from the keyboard
  3258.           MACRo          Macro Processor window
  3259.           NOOP           No-op function, does nothing
  3260.           PRINtlog       Print Log toggle
  3261.           SCROllback     Display Scrollback Buffer
  3262.           SHELl          Shell to DOS
  3263.           TOGGles        Set Toggles
  3264.  
  3265.  
  3266.                                    - end -
  3267.  
  3268.